home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / CIncludes / GXPrinting.h < prev    next >
C/C++ Source or Header  |  1996-05-01  |  159KB  |  4,597 lines

  1. /*
  2.      File:        GXPrinting.h
  3.  
  4.      Contains:    This file contains all printing APIs except for driver/extension specific ones.
  5.  
  6.      Version:    Technology:    Quickdraw GX 1.1
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. */
  18. #ifndef __GXPRINTING__
  19. #define __GXPRINTING__
  20.  
  21. #ifndef __COLLECTIONS__
  22. #include <Collections.h>
  23. #endif
  24. #ifndef __CONDITIONALMACROS__
  25. #include <ConditionalMacros.h>
  26. #endif
  27. #ifndef __DIALOGS__
  28. #include <Dialogs.h>
  29. #endif
  30. #ifndef __ERRORS__
  31. #include <Errors.h>
  32. #endif
  33. #ifndef __FILES__
  34. #include <Files.h>
  35. #endif
  36. #ifndef __GXFONTS__
  37. #include <GXFonts.h>
  38. #endif
  39. #ifndef __GXMATH__
  40. #include <GXMath.h>
  41. #endif
  42. #ifndef __GXTYPES__
  43. #include <GXTypes.h>
  44. #endif
  45. #ifndef __LISTS__
  46. #include <Lists.h>
  47. #endif
  48. #ifndef __MENUS__
  49. #include <Menus.h>
  50. #endif
  51. #ifndef __GXMESSAGES__
  52. #include <GXMessages.h>
  53. #endif
  54. #ifndef __PRINTING__
  55. #include <Printing.h>
  56. #endif
  57. #ifndef __QUICKDRAW__
  58. #include <Quickdraw.h>
  59. #endif
  60.  
  61. #ifdef __cplusplus
  62. extern "C" {
  63. #endif
  64.  
  65. #if PRAGMA_IMPORT_SUPPORTED
  66. #pragma import on
  67. #endif
  68.  
  69. #if PRAGMA_ALIGN_SUPPORTED
  70. #pragma options align=mac68k
  71. #endif
  72.  
  73. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  74. /*
  75. *******************************************************************
  76.                     Start of old "GXPrintingManager.h/a/p" interface file.
  77.             ********************************************************************
  78. */
  79. /*
  80.  ------------------------------------------------------------------------------
  81.  
  82.                             Printing Manager API Contants and Types
  83.  
  84. -------------------------------------------------------------------------------- 
  85. */
  86. /* QuickDraw GX Printing Manager & Overall GX Gestalt Selectors */
  87.  
  88. enum {
  89.     gestaltGXPrintingMgrVersion    = 'pmgr',
  90.     gestaltGXVersion            = 'qdgx'
  91. };
  92.  
  93. typedef unsigned long gxOwnerSignature;
  94. #if OLDROUTINENAMES
  95. typedef unsigned long Signature;
  96. #endif
  97. /*
  98.  
  99.     ABSTRACT DATA TYPES
  100.  
  101. */
  102. /*
  103.  typedef struct gxPrivatePrinterRecord *gxPrinter;
  104.  typedef struct gxPrivateJobRecord *gxJob;
  105.  typedef struct gxPrivateFormatRecord *gxFormat;
  106.  typedef struct gxPrivatePaperTypeRecord *gxPaperType;
  107.  typedef struct gxPrivatePrintFileRecord *gxPrintFile;
  108. */
  109. typedef struct OpaquegxPrinter* gxPrinter;
  110. typedef struct OpaquegxJob* gxJob;
  111. typedef struct OpaquegxFormat* gxFormat;
  112. typedef struct OpaquegxPaperType* gxPaperType;
  113. typedef struct OpaquegxPrintFile* gxPrintFile;
  114. /* Possible values for LoopStatus */
  115. typedef Boolean gxLoopStatus;
  116.  
  117. enum {
  118.     gxStopLooping                = false,
  119.     gxKeepLooping                = true
  120. };
  121.  
  122. typedef pascal gxLoopStatus (*GXViewDeviceProcPtr)(gxViewDevice aViewDevice, void *refCon);
  123.  
  124. #if GENERATINGCFM
  125. typedef UniversalProcPtr GXViewDeviceUPP;
  126. #else
  127. typedef GXViewDeviceProcPtr GXViewDeviceUPP;
  128. #endif
  129.  
  130. enum {
  131.     uppGXViewDeviceProcInfo = kPascalStackBased
  132.          | RESULT_SIZE(SIZE_CODE(sizeof(gxLoopStatus)))
  133.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxViewDevice)))
  134.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  135. };
  136.  
  137. #if GENERATINGCFM
  138. #define NewGXViewDeviceProc(userRoutine)        \
  139.         (GXViewDeviceUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXViewDeviceProcInfo, GetCurrentArchitecture())
  140. #else
  141. #define NewGXViewDeviceProc(userRoutine)        \
  142.         ((GXViewDeviceUPP) (userRoutine))
  143. #endif
  144.  
  145. #if GENERATINGCFM
  146. #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon)        \
  147.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXViewDeviceProcInfo, (aViewDevice), (refCon))
  148. #else
  149. #define CallGXViewDeviceProc(userRoutine, aViewDevice, refCon)        \
  150.         (*(userRoutine))((aViewDevice), (refCon))
  151. #endif
  152. typedef pascal gxLoopStatus (*GXFormatProcPtr)(gxFormat aFormat, void *refCon);
  153.  
  154. #if GENERATINGCFM
  155. typedef UniversalProcPtr GXFormatUPP;
  156. #else
  157. typedef GXFormatProcPtr GXFormatUPP;
  158. #endif
  159.  
  160. enum {
  161.     uppGXFormatProcInfo = kPascalStackBased
  162.          | RESULT_SIZE(SIZE_CODE(sizeof(gxLoopStatus)))
  163.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  164.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  165. };
  166.  
  167. #if GENERATINGCFM
  168. #define NewGXFormatProc(userRoutine)        \
  169.         (GXFormatUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatProcInfo, GetCurrentArchitecture())
  170. #else
  171. #define NewGXFormatProc(userRoutine)        \
  172.         ((GXFormatUPP) (userRoutine))
  173. #endif
  174.  
  175. #if GENERATINGCFM
  176. #define CallGXFormatProc(userRoutine, aFormat, refCon)        \
  177.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFormatProcInfo, (aFormat), (refCon))
  178. #else
  179. #define CallGXFormatProc(userRoutine, aFormat, refCon)        \
  180.         (*(userRoutine))((aFormat), (refCon))
  181. #endif
  182. typedef pascal gxLoopStatus (*GXPaperTypeProcPtr)(gxPaperType aPapertype, void *refCon);
  183.  
  184. #if GENERATINGCFM
  185. typedef UniversalProcPtr GXPaperTypeUPP;
  186. #else
  187. typedef GXPaperTypeProcPtr GXPaperTypeUPP;
  188. #endif
  189.  
  190. enum {
  191.     uppGXPaperTypeProcInfo = kPascalStackBased
  192.          | RESULT_SIZE(SIZE_CODE(sizeof(gxLoopStatus)))
  193.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPaperType)))
  194.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  195. };
  196.  
  197. #if GENERATINGCFM
  198. #define NewGXPaperTypeProc(userRoutine)        \
  199.         (GXPaperTypeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPaperTypeProcInfo, GetCurrentArchitecture())
  200. #else
  201. #define NewGXPaperTypeProc(userRoutine)        \
  202.         ((GXPaperTypeUPP) (userRoutine))
  203. #endif
  204.  
  205. #if GENERATINGCFM
  206. #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon)        \
  207.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXPaperTypeProcInfo, (aPapertype), (refCon))
  208. #else
  209. #define CallGXPaperTypeProc(userRoutine, aPapertype, refCon)        \
  210.         (*(userRoutine))((aPapertype), (refCon))
  211. #endif
  212. typedef pascal OSErr (*GXPrintingFlattenProcPtr)(long size, void *data, void *refCon);
  213.  
  214. #if GENERATINGCFM
  215. typedef UniversalProcPtr GXPrintingFlattenUPP;
  216. #else
  217. typedef GXPrintingFlattenProcPtr GXPrintingFlattenUPP;
  218. #endif
  219.  
  220. enum {
  221.     uppGXPrintingFlattenProcInfo = kPascalStackBased
  222.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  223.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  224.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  225.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))
  226. };
  227.  
  228. #if GENERATINGCFM
  229. #define NewGXPrintingFlattenProc(userRoutine)        \
  230.         (GXPrintingFlattenUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, GetCurrentArchitecture())
  231. #else
  232. #define NewGXPrintingFlattenProc(userRoutine)        \
  233.         ((GXPrintingFlattenUPP) (userRoutine))
  234. #endif
  235.  
  236. #if GENERATINGCFM
  237. #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon)        \
  238.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXPrintingFlattenProcInfo, (size), (data), (refCon))
  239. #else
  240. #define CallGXPrintingFlattenProc(userRoutine, size, data, refCon)        \
  241.         (*(userRoutine))((size), (data), (refCon))
  242. #endif
  243. #if OLDROUTINENAMES
  244. typedef GXViewDeviceProcPtr gxViewDeviceProc;
  245. typedef GXFormatProcPtr gxFormatProc;
  246. typedef GXPaperTypeProcPtr gxPaperTypeProc;
  247. typedef GXPrintingFlattenProcPtr gxPrintingFlattenProc;
  248. #endif
  249. /*
  250.     The following constants are used to set collection item flags in printing
  251.     collections. The Printing Manager purges certain items whenever a driver
  252.     switch occurs. If the formatting driver changes, all items marked as
  253.     gxVolatileFormattingDriverCategory will be purged.  If the output driver
  254.     changes, all items marked as gxVolatileOutputDriverCategory will be purged.
  255.     Note that to prevent items from being flattened when GXFlattenJob is called,
  256.     you should unset the collectionPersistenceBit (defined in Collections.h),
  257.     which is on by default.
  258. */
  259. /* Structure stored in collection items' user attribute bits */
  260. typedef short gxCollectionCategory;
  261.  
  262. enum {
  263.     gxNoCollectionCategory        = 0x0000,
  264.     gxOutputDriverCategory        = 0x0001,
  265.     gxFormattingDriverCategory    = 0x0002,
  266.     gxDriverVolatileCategory    = 0x0004,
  267.     gxVolatileOutputDriverCategory = gxOutputDriverCategory + gxDriverVolatileCategory,
  268.     gxVolatileFormattingDriverCategory = gxFormattingDriverCategory + gxDriverVolatileCategory
  269. };
  270.  
  271. /*
  272.  
  273.     >>>>>> JOB COLLECTION ITEMS <<<<<<
  274.  
  275. */
  276. /* gxJobInfo COLLECTION ITEM */
  277.  
  278. enum {
  279.     gxJobTag                    = 'job '
  280. };
  281.  
  282. struct gxJobInfo {
  283.     long                             numPages;                    /* Number of pages in the document */
  284.     long                             priority;                    /* Priority of this job plus "is it on hold?" */
  285.     unsigned long                     timeToPrint;                /* When to print job, if scheduled */
  286.     long                             jobTimeout;                    /* Timeout value, in ticks */
  287.     long                             firstPageToPrint;            /* Start printing from this page */
  288.     short                             jobAlert;                    /* How to alert user when printing */
  289.     Str31                             appName;                    /* Which application printed the document */
  290.     Str31                             documentName;                /* The name of the document being printed */
  291.     Str31                             userName;                    /* The owner name of the machine that printed the document */
  292. };
  293. typedef struct gxJobInfo gxJobInfo;
  294.  
  295. /* gxPDDDefaultSettingTag COLLECTION ITEM */
  296.  
  297. enum {
  298.     gxPDDDefaultSettingTag        = 'pdds'
  299. };
  300.  
  301. struct gxPDDDefaultSettingInfo {
  302.     Boolean                         useDefaultSetting;            /* true if PDD default setting should be used */
  303.     SInt8                             pad;
  304. };
  305. typedef struct gxPDDDefaultSettingInfo gxPDDDefaultSettingInfo;
  306.  
  307. /* priority field constants */
  308.  
  309. enum {
  310.     gxPrintJobHoldingBit        = 0x00001000                    /* This bit is set if the job is on hold. */
  311. };
  312.  
  313.  
  314. enum {
  315.     gxPrintJobUrgent            = 0x00000001,
  316.     gxPrintJobAtTime            = 0x00000002,
  317.     gxPrintJobASAP                = 0x00000003,
  318.     gxPrintJobHolding            = (gxPrintJobHoldingBit + gxPrintJobASAP),
  319.     gxPrintJobHoldingAtTime        = (gxPrintJobHoldingBit + gxPrintJobAtTime),
  320.     gxPrintJobHoldingUrgent        = (gxPrintJobHoldingBit + gxPrintJobUrgent)
  321. };
  322.  
  323. /* jobAlert field constants */
  324.  
  325. enum {
  326.     gxNoPrintTimeAlert            = 0,                            /* Don't alert user when we print */
  327.     gxAlertBefore                = 1,                            /* Alert user before we print */
  328.     gxAlertAfter                = 2,                            /* Alert user after we print */
  329.     gxAlertBothTimes            = 3                                /* Alert before and after we print */
  330. };
  331.  
  332. /* jobTimeout field constants */
  333.  
  334. enum {
  335.     gxThirtySeconds                = 1800,                            /* 30 seconds in ticks */
  336.     gxTwoMinutes                = 7200                            /* 2 minutes in ticks */
  337. };
  338.  
  339. /* gxCollationTag COLLECTION ITEM */
  340.  
  341. enum {
  342.     gxCollationTag                = 'sort'
  343. };
  344.  
  345. struct gxCollationInfo {
  346.     Boolean                         collation;                    /* True if copies are to be collated */
  347.     char                             padByte;
  348. };
  349. typedef struct gxCollationInfo gxCollationInfo;
  350.  
  351. /* gxCopiesTag COLLECTION ITEM */
  352.  
  353. enum {
  354.     gxCopiesTag                    = 'copy'
  355. };
  356.  
  357. struct gxCopiesInfo {
  358.     long                             copies;                        /* Number of copies of the document to print */
  359. };
  360. typedef struct gxCopiesInfo gxCopiesInfo;
  361.  
  362. /* gxPageRangeTag COLLECTION ITEM */
  363.  
  364. enum {
  365.     gxPageRangeTag                = 'rang'
  366. };
  367.  
  368. struct gxSimplePageRangeInfo {
  369.     char                             optionChosen;                /* From options listed below */
  370.     Boolean                         printAll;                    /* True if user wants to print all pages */
  371.     long                             fromPage;                    /* For gxDefaultPageRange, current value */
  372.     long                             toPage;                        /* For gxDefaultPageRange, current value */
  373. };
  374. typedef struct gxSimplePageRangeInfo gxSimplePageRangeInfo;
  375.  
  376. struct gxPageRangeInfo {
  377.     gxSimplePageRangeInfo             simpleRange;                /* Info which will be returned for GetJobPageRange */
  378.     Str31                             fromString;                    /* For gxCustomizePageRange, current value */
  379.     Str31                             toString;                    /* For gxCustomizePageRange, current value */
  380.     long                             minFromPage;                /* For gxDefaultPageRange, we parse with this, ignored if nil */
  381.     long                             maxToPage;                    /* For gxDefaultPageRange, we parse with this, ignored if nil */
  382.     char                             replaceString[1];            /* For gxReplacePageRange, string to display */
  383. };
  384. typedef struct gxPageRangeInfo gxPageRangeInfo;
  385.  
  386. /* optionChosen field constants for SimplePageRangeInfo */
  387.  
  388. enum {
  389.     gxDefaultPageRange            = 0,
  390.     gxReplacePageRange            = 1,
  391.     gxCustomizePageRange        = 2
  392. };
  393.  
  394. /* gxQualityTag COLLECTION ITEM */
  395.  
  396. enum {
  397.     gxQualityTag                = 'qual'
  398. };
  399.  
  400. struct gxQualityInfo {
  401.     Boolean                         disableQuality;                /* True to disable standard quality controls */
  402.     char                             padByte;
  403.     short                             defaultQuality;                /* The default quality value */
  404.     short                             currentQuality;                /* The current quality value */
  405.     short                             qualityCount;                /* The number of quality menu items in popup menu */
  406.     char                             qualityNames[1];            /* An array of packed pascal strings for popup menu titles */
  407. };
  408. typedef struct gxQualityInfo gxQualityInfo;
  409.  
  410. /* gxFileDestinationTag COLLECTION ITEM */
  411.  
  412. enum {
  413.     gxFileDestinationTag        = 'dest'
  414. };
  415.  
  416. struct gxFileDestinationInfo {
  417.     Boolean                         toFile;                        /* True if destination is a file */
  418.     char                             padByte;
  419. };
  420. typedef struct gxFileDestinationInfo gxFileDestinationInfo;
  421.  
  422. /* gxFileLocationTag COLLECTION ITEM */
  423.  
  424. enum {
  425.     gxFileLocationTag            = 'floc'
  426. };
  427.  
  428. struct gxFileLocationInfo {
  429.     FSSpec                             fileSpec;                    /* Location to put file, if destination is file */
  430. };
  431. typedef struct gxFileLocationInfo gxFileLocationInfo;
  432.  
  433. /* gxFileFormatTag COLLECTION ITEM */
  434.  
  435. enum {
  436.     gxFileFormatTag                = 'ffmt'
  437. };
  438.  
  439. struct gxFileFormatInfo {
  440.     Str31                             fileFormatName;                /* Name of file format (e.g. "PostScript") if destination is file */
  441. };
  442. typedef struct gxFileFormatInfo gxFileFormatInfo;
  443.  
  444. /* gxFileFontsTag COLLECTION ITEM */
  445.  
  446. enum {
  447.     gxFileFontsTag                = 'incf'
  448. };
  449.  
  450. struct gxFileFontsInfo {
  451.     char                             includeFonts;                /* Which fonts to include, if destination is file */
  452.     char                             padByte;
  453. };
  454. typedef struct gxFileFontsInfo gxFileFontsInfo;
  455.  
  456. /* includeFonts field constants */
  457.  
  458. enum {
  459.     gxIncludeNoFonts            = 1,                            /* Include no fonts */
  460.     gxIncludeAllFonts            = 2,                            /* Include all fonts */
  461.     gxIncludeNonStandardFonts    = 3                                /* Include only fonts that aren't in the standard LW set */
  462. };
  463.  
  464. /* gxPaperFeedTag COLLECTION ITEM */
  465.  
  466. enum {
  467.     gxPaperFeedTag                = 'feed'
  468. };
  469.  
  470. struct gxPaperFeedInfo {
  471.     Boolean                         autoFeed;                    /* True if automatic feed, false if manual */
  472.     char                             padByte;
  473. };
  474. typedef struct gxPaperFeedInfo gxPaperFeedInfo;
  475.  
  476. /* gxTrayFeedTag COLLECTION ITEM */
  477.  
  478. enum {
  479.     gxTrayFeedTag                = 'tray'
  480. };
  481.  
  482. typedef long gxTrayIndex;
  483. struct gxTrayFeedInfo {
  484.     gxTrayIndex                     feedTrayIndex;                /* Tray to feed paper from */
  485.     Boolean                         manualFeedThisPage;            /* Signals manual feeding for the page */
  486.     char                             padByte;
  487. };
  488. typedef struct gxTrayFeedInfo gxTrayFeedInfo;
  489.  
  490. /* gxManualFeedTag COLLECTION ITEM */
  491.  
  492. enum {
  493.     gxManualFeedTag                = 'manf'
  494. };
  495.  
  496. struct gxManualFeedInfo {
  497.     long                             numPaperTypeNames;            /* Number of paperTypes to manually feed */
  498.     Str31                             paperTypeNames[1];            /* Array of names of paperTypes to manually feed */
  499. };
  500. typedef struct gxManualFeedInfo gxManualFeedInfo;
  501.  
  502. /* gxNormalMappingTag COLLECTION ITEM */
  503.  
  504. enum {
  505.     gxNormalMappingTag            = 'nmap'
  506. };
  507.  
  508. struct gxNormalMappingInfo {
  509.     Boolean                         normalPaperMapping;            /* True if not overriding normal paper mapping */
  510.     char                             padByte;
  511. };
  512. typedef struct gxNormalMappingInfo gxNormalMappingInfo;
  513.  
  514. /* gxSpecialMappingTag COLLECTION ITEM */
  515.  
  516. enum {
  517.     gxSpecialMappingTag            = 'smap'
  518. };
  519.  
  520. struct gxSpecialMappingInfo {
  521.     char                             specialMapping;                /* Enumerated redirect, scale or tile setting */
  522.     char                             padByte;
  523. };
  524. typedef struct gxSpecialMappingInfo gxSpecialMappingInfo;
  525.  
  526. /* specialMapping field constants */
  527.  
  528. enum {
  529.     gxRedirectPages                = 1,                            /* Redirect pages to a papertype and clip if necessary */
  530.     gxScalePages                = 2,                            /* Scale pages if necessary */
  531.     gxTilePages                    = 3                                /* Tile pages if necessary */
  532. };
  533.  
  534. /* gxTrayMappingTag COLLECTION ITEM */
  535.  
  536. enum {
  537.     gxTrayMappingTag            = 'tmap'
  538. };
  539.  
  540. struct gxTrayMappingInfo {
  541.     gxTrayIndex                     mapPaperToTray;                /* Tray to map all paper to */
  542. };
  543. typedef struct gxTrayMappingInfo gxTrayMappingInfo;
  544.  
  545. /* gxPaperMappingTag COLLECTION ITEM */
  546. /* This collection item contains a flattened paper type resource */
  547.  
  548. enum {
  549.     gxPaperMappingTag            = 'pmap'
  550. };
  551.  
  552. /* gxPrintPanelTag COLLECTION ITEM */
  553.  
  554. enum {
  555.     gxPrintPanelTag                = 'ppan'
  556. };
  557.  
  558. struct gxPrintPanelInfo {
  559.     Str31                             startPanelName;                /* Name of starting panel in Print dialog */
  560. };
  561. typedef struct gxPrintPanelInfo gxPrintPanelInfo;
  562.  
  563. /* gxFormatPanelTag COLLECTION ITEM */
  564.  
  565. enum {
  566.     gxFormatPanelTag            = 'fpan'
  567. };
  568.  
  569. struct gxFormatPanelInfo {
  570.     Str31                             startPanelName;                /* Name of starting panel in Format dialog */
  571. };
  572. typedef struct gxFormatPanelInfo gxFormatPanelInfo;
  573.  
  574. /* gxTranslatedDocumentTag COLLECTION ITEM */
  575.  
  576. enum {
  577.     gxTranslatedDocumentTag        = 'trns'
  578. };
  579.  
  580. struct gxTranslatedDocumentInfo {
  581.     long                             translatorInfo;                /* Information from the translation process */
  582. };
  583. typedef struct gxTranslatedDocumentInfo gxTranslatedDocumentInfo;
  584.  
  585. /* gxCoverPageTag COLLECTION ITEM */
  586.  
  587. enum {
  588.     gxCoverPageTag                = 'cvpg'
  589. };
  590.  
  591. struct gxCoverPageInfo {
  592.     long                             coverPage;                    /* Use same enum values as for PrintRecord field in GXPrinterDrivers.h */
  593. };
  594. typedef struct gxCoverPageInfo gxCoverPageInfo;
  595.  
  596. /*
  597.  
  598.     >>>>>> FORMAT COLLECTION ITEMS <<<<<<
  599.  
  600. */
  601. /* gxPaperTypeLockTag COLLECTION ITEM */
  602.  
  603. enum {
  604.     gxPaperTypeLockTag            = 'ptlk'
  605. };
  606.  
  607. struct gxPaperTypeLockInfo {
  608.     Boolean                         paperTypeLocked;            /* True if format's paperType is locked */
  609.     char                             padByte;
  610. };
  611. typedef struct gxPaperTypeLockInfo gxPaperTypeLockInfo;
  612.  
  613. /* gxOrientationTag COLLECTION ITEM */
  614.  
  615. enum {
  616.     gxOrientationTag            = 'layo'
  617. };
  618.  
  619. struct gxOrientationInfo {
  620.     char                             orientation;                /* An enumerated orientation value */
  621.     char                             padByte;
  622. };
  623. typedef struct gxOrientationInfo gxOrientationInfo;
  624.  
  625. /* orientation field constants */
  626.  
  627. enum {
  628.     gxPortraitLayout            = 0,                            /* Portrait */
  629.     gxLandscapeLayout            = 1,                            /* Landscape */
  630.     gxRotatedPortraitLayout        = 2,                            /* Portrait, rotated 180∞ */
  631.     gxRotatedLandscapeLayout    = 3                                /* Landscape, rotated 180∞  */
  632. };
  633.  
  634. /* gxScalingTag COLLECTION ITEM */
  635.  
  636. enum {
  637.     gxScalingTag                = 'scal'
  638. };
  639.  
  640. struct gxScalingInfo {
  641.     Fixed                             horizontalScaleFactor;        /* Current horizontal scaling factor */
  642.     Fixed                             verticalScaleFactor;        /* Current vertical scaling factor */
  643.     short                             minScaling;                    /* Minimum scaling allowed */
  644.     short                             maxScaling;                    /* Maximum scaling allowed */
  645. };
  646. typedef struct gxScalingInfo gxScalingInfo;
  647.  
  648. /* gxDirectModeTag COLLECTION ITEM */
  649.  
  650. enum {
  651.     gxDirectModeTag                = 'dirm'
  652. };
  653.  
  654. struct gxDirectModeInfo {
  655.     Boolean                         directModeOn;                /* True if a direct mode is enabled */
  656.     char                             padByte;
  657. };
  658. typedef struct gxDirectModeInfo gxDirectModeInfo;
  659.  
  660. /* gxFormatHalftoneTag COLLECTION ITEM */
  661.  
  662. enum {
  663.     gxFormatHalftoneTag            = 'half'
  664. };
  665.  
  666. struct gxFormatHalftoneInfo {
  667.     long                             numHalftones;                /* Number of halftone records */
  668.     gxHalftone                         halftones[1];                /* The halftone records */
  669. };
  670. typedef struct gxFormatHalftoneInfo gxFormatHalftoneInfo;
  671.  
  672. /* gxInvertPageTag COLLECTION ITEM */
  673.  
  674. enum {
  675.     gxInvertPageTag                = 'invp'
  676. };
  677.  
  678. struct gxInvertPageInfo {
  679.     char                             padByte;
  680.     Boolean                         invert;                        /* If true, invert page */
  681. };
  682. typedef struct gxInvertPageInfo gxInvertPageInfo;
  683.  
  684. /* gxFlipPageHorizontalTag COLLECTION ITEM */
  685.  
  686. enum {
  687.     gxFlipPageHorizontalTag        = 'flph'
  688. };
  689.  
  690. struct gxFlipPageHorizontalInfo {
  691.     char                             padByte;
  692.     Boolean                         flipHorizontal;                /* If true, flip x coordinates on page */
  693. };
  694. typedef struct gxFlipPageHorizontalInfo gxFlipPageHorizontalInfo;
  695.  
  696. /* gxFlipPageVerticalTag COLLECTION ITEM */
  697.  
  698. enum {
  699.     gxFlipPageVerticalTag        = 'flpv'
  700. };
  701.  
  702. struct gxFlipPageVerticalInfo {
  703.     char                             padByte;
  704.     Boolean                         flipVertical;                /* If true, flip y coordinates on page */
  705. };
  706. typedef struct gxFlipPageVerticalInfo gxFlipPageVerticalInfo;
  707.  
  708. /* gxPreciseBitmapsTag COLLECTION ITEM */
  709.  
  710. enum {
  711.     gxPreciseBitmapsTag            = 'pbmp'
  712. };
  713.  
  714. struct gxPreciseBitmapInfo {
  715.     Boolean                         preciseBitmaps;                /* If true, scale page by 96% */
  716.     char                             padByte;
  717. };
  718. typedef struct gxPreciseBitmapInfo gxPreciseBitmapInfo;
  719.  
  720. /*
  721.  
  722.     >>>>>> PAPERTYPE COLLECTION ITEMS <<<<<<
  723.  
  724. */
  725. /* gxBaseTag COLLECTION ITEM */
  726.  
  727. enum {
  728.     gxBaseTag                    = 'base'
  729. };
  730.  
  731. struct gxBaseInfo {
  732.     long                             baseType;                    /* PaperType's base type */
  733. };
  734. typedef struct gxBaseInfo gxBaseInfo;
  735.  
  736. /* baseType field constants */
  737.  
  738. enum {
  739.     gxUnknownBase                = 0,                            /* Base paper type from which this paper type is */
  740.     gxUSLetterBase                = 1,                            /* derived.  This is not a complete set. */
  741.     gxUSLegalBase                = 2,
  742.     gxA4LetterBase                = 3,
  743.     gxB5LetterBase                = 4,
  744.     gxTabloidBase                = 5
  745. };
  746.  
  747. /* gxCreatorTag COLLECTION ITEM */
  748.  
  749. enum {
  750.     gxCreatorTag                = 'crea'
  751. };
  752.  
  753. struct gxCreatorInfo {
  754.     OSType                             creator;                    /* PaperType's creator */
  755. };
  756. typedef struct gxCreatorInfo gxCreatorInfo;
  757.  
  758. /* gxUnitsTag COLLECTION ITEM */
  759.  
  760. enum {
  761.     gxUnitsTag                    = 'unit'
  762. };
  763.  
  764. struct gxUnitsInfo {
  765.     char                             units;                        /* PaperType's units (used by PaperType Editor). */
  766.     char                             padByte;
  767. };
  768. typedef struct gxUnitsInfo gxUnitsInfo;
  769.  
  770. /* units field constants */
  771.  
  772. enum {
  773.     gxPicas                        = 0,                            /* Pica measurement */
  774.     gxMMs                        = 1,                            /* Millimeter measurement */
  775.     gxInches                    = 2                                /* Inches measurement */
  776. };
  777.  
  778. /* gxFlagsTag COLLECTION ITEM */
  779.  
  780. enum {
  781.     gxFlagsTag                    = 'flag'
  782. };
  783.  
  784. struct gxFlagsInfo {
  785.     long                             flags;                        /* PaperType's flags */
  786. };
  787. typedef struct gxFlagsInfo gxFlagsInfo;
  788.  
  789. /* flags field constants */
  790.  
  791. enum {
  792.     gxOldPaperTypeFlag            = 0x00800000,                    /* Indicates a paper type for compatibility printing */
  793.     gxNewPaperTypeFlag            = 0x00400000,                    /* Indicates a paper type for QuickDraw GX-aware printing */
  794.     gxOldAndNewFlag                = 0x00C00000,                    /* Indicates a paper type that's both old and new */
  795.     gxDefaultPaperTypeFlag        = 0x00100000                    /* Indicates the default paper type in the group */
  796. };
  797.  
  798. /* gxCommentTag COLLECTION ITEM */
  799.  
  800. enum {
  801.     gxCommentTag                = 'cmnt'
  802. };
  803.  
  804. struct gxCommentInfo {
  805.     Str255                             comment;                    /* PaperType's comment */
  806. };
  807. typedef struct gxCommentInfo gxCommentInfo;
  808.  
  809. /*
  810.  
  811.     >>>>>> PRINTER VIEWDEVICE TAGS <<<<<<
  812.  
  813. */
  814. /* gxPenTableTag COLLECTION ITEM */
  815.  
  816. enum {
  817.     gxPenTableTag                = 'pent'
  818. };
  819.  
  820. struct gxPenTableEntry {
  821.     Str31                             penName;                    /* Name of the pen */
  822.     gxColor                         penColor;                    /* Color to use from the color set */
  823.     Fixed                             penThickness;                /* Size of the pen */
  824.     short                             penUnits;                    /* Specifies units in which pen thickness is defined */
  825.     short                             penPosition;                /* Pen position in the carousel, -1 (kPenNotLoaded) if not loaded */
  826. };
  827. typedef struct gxPenTableEntry gxPenTableEntry;
  828.  
  829. struct gxPenTable {
  830.     long                             numPens;                    /* Number of pen entries in the following array */
  831.     gxPenTableEntry                 pens[1];                    /* Array of pen entries */
  832. };
  833. typedef struct gxPenTable gxPenTable;
  834.  
  835. typedef gxPenTable *gxPenTablePtr;
  836. typedef gxPenTablePtr *gxPenTableHdl;
  837. /* penUnits field constants */
  838.  
  839. enum {
  840.     gxDeviceUnits                = 0,
  841.     gxMMUnits                    = 1,
  842.     gxInchesUnits                = 2
  843. };
  844.  
  845. /* penPosition field constants */
  846.  
  847. enum {
  848.     gxPenNotLoaded                = -1
  849. };
  850.  
  851. /*
  852.  
  853.     >>>>>> DIALOG-RELATED CONSTANTS AND TYPES <<<<<<
  854.  
  855. */
  856. typedef long gxDialogResult;
  857.  
  858. enum {
  859.     gxCancelSelected            = 0L,
  860.     gxOKSelected                = 1L,
  861.     gxRevertSelected            = 2L
  862. };
  863.  
  864. struct gxEditMenuRecord {
  865.     short                             editMenuID;
  866.     short                             cutItem;
  867.     short                             copyItem;
  868.     short                             pasteItem;
  869.     short                             clearItem;
  870.     short                             undoItem;
  871. };
  872. typedef struct gxEditMenuRecord gxEditMenuRecord;
  873.  
  874. /*
  875.  
  876.     >>>>>> JOB FORMAT MODE CONSTANTS AND TYPES <<<<<<
  877.  
  878. */
  879. typedef OSType gxJobFormatMode;
  880. struct gxJobFormatModeTable {
  881.     long                             numModes;                    /* Number of job format modes to choose from */
  882.     gxJobFormatMode                 modes[1];                    /* The job format modes */
  883. };
  884. typedef struct gxJobFormatModeTable gxJobFormatModeTable;
  885.  
  886. typedef gxJobFormatModeTable *gxJobFormatModeTablePtr;
  887. typedef gxJobFormatModeTablePtr *gxJobFormatModeTableHdl;
  888.  
  889. enum {
  890.     gxGraphicsJobFormatMode        = 'grph',
  891.     gxTextJobFormatMode            = 'text',
  892.     gxPostScriptJobFormatMode    = 'post'
  893. };
  894.  
  895. typedef long gxQueryType;
  896.  
  897. enum {
  898.     gxGetJobFormatLineConstraintQuery = 0L,
  899.     gxGetJobFormatFontsQuery    = 1L,
  900.     gxGetJobFormatFontCommonStylesQuery = 2L,
  901.     gxGetJobFormatFontConstraintQuery = 3L,
  902.     gxSetStyleJobFormatCommonStyleQuery = 4L
  903. };
  904.  
  905. /* Structures used for Text mode field constants */
  906. struct gxPositionConstraintTable {
  907.     gxPoint                         phase;                        /* Position phase */
  908.     gxPoint                         offset;                        /* Position offset */
  909.     long                             numSizes;                    /* Number of available font sizes */
  910.     Fixed                             sizes[1];                    /* The available font sizes */
  911. };
  912. typedef struct gxPositionConstraintTable gxPositionConstraintTable;
  913.  
  914. typedef gxPositionConstraintTable *gxPositionConstraintTablePtr;
  915. typedef gxPositionConstraintTablePtr *gxPositionConstraintTableHdl;
  916. /* numSizes field constants */
  917.  
  918. enum {
  919.     gxConstraintRange            = -1
  920. };
  921.  
  922. struct gxStyleNameTable {
  923.     long                             numStyleNames;                /* Number of style names */
  924.     Str255                             styleNames[1];                /* The style names */
  925. };
  926. typedef struct gxStyleNameTable gxStyleNameTable;
  927.  
  928. typedef gxStyleNameTable *gxStyleNameTablePtr;
  929. typedef gxStyleNameTablePtr *gxStyleNameTableHdl;
  930. struct gxFontTable {
  931.     long                             numFonts;                    /* Number of font references */
  932.     gxFont                             fonts[1];                    /* The font references */
  933. };
  934. typedef struct gxFontTable gxFontTable;
  935.  
  936. typedef gxFontTable *gxFontTablePtr;
  937. typedef gxFontTablePtr *gxFontTableHdl;
  938. /*
  939.  ------------------------------------------------------------------------------
  940.  
  941.                                 Printing Manager API Functions
  942.  
  943. -------------------------------------------------------------------------------- 
  944. */
  945. /*
  946.     Global Routines
  947. */
  948. extern pascal OSErr GXInitPrinting(void )
  949.  FOURWORDINLINE(0x203C, 0x0000, 0x0000, 0xABFE);
  950.  
  951. extern pascal OSErr GXExitPrinting(void )
  952.  FOURWORDINLINE(0x203C, 0x0000, 0x0001, 0xABFE);
  953.  
  954. /*
  955.     Error-Handling Routines
  956. */
  957. extern pascal OSErr GXGetJobError(gxJob aJob)
  958.  FOURWORDINLINE(0x203C, 0x0000, 0x000E, 0xABFE);
  959.  
  960. extern pascal void GXSetJobError(gxJob aJob, OSErr anErr)
  961.  FOURWORDINLINE(0x203C, 0x0000, 0x000F, 0xABFE);
  962.  
  963. /*
  964.     Job Routines
  965. */
  966. extern pascal OSErr GXNewJob(gxJob *aJob)
  967.  FOURWORDINLINE(0x203C, 0x0000, 0x0002, 0xABFE);
  968.  
  969. extern pascal OSErr GXDisposeJob(gxJob aJob)
  970.  FOURWORDINLINE(0x203C, 0x0000, 0x0003, 0xABFE);
  971.  
  972. extern pascal void GXFlattenJob(gxJob aJob, GXPrintingFlattenUPP flattenProc, void *aVoid)
  973.  FOURWORDINLINE(0x203C, 0x0000, 0x0004, 0xABFE);
  974.  
  975. extern pascal gxJob GXUnflattenJob(gxJob aJob, GXPrintingFlattenUPP flattenProc, void *aVoid)
  976.  FOURWORDINLINE(0x203C, 0x0000, 0x0005, 0xABFE);
  977.  
  978. extern pascal Handle GXFlattenJobToHdl(gxJob aJob, Handle aHdl)
  979.  FOURWORDINLINE(0x203C, 0x0000, 0x0006, 0xABFE);
  980.  
  981. extern pascal gxJob GXUnflattenJobFromHdl(gxJob aJob, Handle aHdl)
  982.  FOURWORDINLINE(0x203C, 0x0000, 0x0007, 0xABFE);
  983.  
  984. extern pascal void GXInstallApplicationOverride(gxJob aJob, short messageID, void *override)
  985.  FOURWORDINLINE(0x203C, 0x0000, 0x0008, 0xABFE);
  986.  
  987. extern pascal Collection GXGetJobCollection(gxJob aJob)
  988.  FOURWORDINLINE(0x203C, 0x0000, 0x001D, 0xABFE);
  989.  
  990. extern pascal void *GXGetJobRefCon(gxJob aJob)
  991.  FOURWORDINLINE(0x203C, 0x0000, 0x001E, 0xABFE);
  992.  
  993. extern pascal void GXSetJobRefCon(gxJob aJob, void *refCon)
  994.  FOURWORDINLINE(0x203C, 0x0000, 0x001F, 0xABFE);
  995.  
  996. extern pascal gxJob GXCopyJob(gxJob srcJob, gxJob dstJob)
  997.  FOURWORDINLINE(0x203C, 0x0000, 0x0020, 0xABFE);
  998.  
  999. extern pascal void GXSelectJobFormattingPrinter(gxJob aJob, Str31 printerName)
  1000.  FOURWORDINLINE(0x203C, 0x0000, 0x0021, 0xABFE);
  1001.  
  1002. extern pascal void GXSelectJobOutputPrinter(gxJob aJob, Str31 printerName)
  1003.  FOURWORDINLINE(0x203C, 0x0000, 0x0022, 0xABFE);
  1004.  
  1005. extern pascal void GXForEachJobFormatDo(gxJob aJob, GXFormatUPP formatProc, void *refCon)
  1006.  FOURWORDINLINE(0x203C, 0x0000, 0x0023, 0xABFE);
  1007.  
  1008. extern pascal long GXCountJobFormats(gxJob aJob)
  1009.  FOURWORDINLINE(0x203C, 0x0000, 0x0024, 0xABFE);
  1010.  
  1011. extern pascal Boolean GXUpdateJob(gxJob aJob)
  1012.  FOURWORDINLINE(0x203C, 0x0000, 0x0025, 0xABFE);
  1013.  
  1014. #endif
  1015. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  1016. extern pascal void GXConvertPrintRecord(gxJob aJob, THPrint hPrint)
  1017.  FOURWORDINLINE(0x203C, 0x0000, 0x0026, 0xABFE);
  1018.  
  1019. #endif
  1020. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  1021. extern pascal void GXIdleJob(gxJob aJob)
  1022.  FOURWORDINLINE(0x203C, 0x0000, 0x0057, 0xABFE);
  1023.  
  1024. /*
  1025.     Job Format Modes Routines
  1026. */
  1027. extern pascal void GXSetAvailableJobFormatModes(gxJob aJob, gxJobFormatModeTableHdl formatModeTable)
  1028.  FOURWORDINLINE(0x203C, 0x0000, 0x003B, 0xABFE);
  1029.  
  1030. extern pascal gxJobFormatMode GXGetPreferredJobFormatMode(gxJob aJob, Boolean *directOnly)
  1031.  FOURWORDINLINE(0x203C, 0x0000, 0x003C, 0xABFE);
  1032.  
  1033. extern pascal gxJobFormatMode GXGetJobFormatMode(gxJob aJob)
  1034.  FOURWORDINLINE(0x203C, 0x0000, 0x003D, 0xABFE);
  1035.  
  1036. extern pascal void GXSetJobFormatMode(gxJob aJob, gxJobFormatMode formatMode)
  1037.  FOURWORDINLINE(0x203C, 0x0000, 0x003E, 0xABFE);
  1038.  
  1039. extern pascal void GXJobFormatModeQuery(gxJob aJob, gxQueryType aQueryType, void *srcData, void *dstData)
  1040.  FOURWORDINLINE(0x203C, 0x0000, 0x003F, 0xABFE);
  1041.  
  1042. /*
  1043.     Format Routines
  1044. */
  1045. extern pascal gxFormat GXNewFormat(gxJob aJob)
  1046.  FOURWORDINLINE(0x203C, 0x0000, 0x0009, 0xABFE);
  1047.  
  1048. extern pascal void GXDisposeFormat(gxFormat aFormat)
  1049.  FOURWORDINLINE(0x203C, 0x0000, 0x000A, 0xABFE);
  1050.  
  1051. extern pascal gxFormat GXGetJobFormat(gxJob aJob, long whichFormat)
  1052.  FOURWORDINLINE(0x203C, 0x0000, 0x0013, 0xABFE);
  1053.  
  1054. extern pascal gxJob GXGetFormatJob(gxFormat aFormat)
  1055.  FOURWORDINLINE(0x203C, 0x0000, 0x0014, 0xABFE);
  1056.  
  1057. extern pascal gxPaperType GXGetFormatPaperType(gxFormat aFormat)
  1058.  FOURWORDINLINE(0x203C, 0x0000, 0x0015, 0xABFE);
  1059.  
  1060. extern pascal void GXGetFormatDimensions(gxFormat aFormat, gxRectangle *pageSize, gxRectangle *paperSize)
  1061.  FOURWORDINLINE(0x203C, 0x0000, 0x0016, 0xABFE);
  1062.  
  1063. extern pascal Collection GXGetFormatCollection(gxFormat aFormat)
  1064.  FOURWORDINLINE(0x203C, 0x0000, 0x0033, 0xABFE);
  1065.  
  1066. extern pascal void GXChangedFormat(gxFormat aFormat)
  1067.  FOURWORDINLINE(0x203C, 0x0000, 0x0034, 0xABFE);
  1068.  
  1069. extern pascal gxFormat GXCopyFormat(gxFormat srcFormat, gxFormat dstFormat)
  1070.  FOURWORDINLINE(0x203C, 0x0000, 0x0035, 0xABFE);
  1071.  
  1072. extern pascal gxFormat GXCloneFormat(gxFormat aFormat)
  1073.  FOURWORDINLINE(0x203C, 0x0000, 0x0036, 0xABFE);
  1074.  
  1075. extern pascal long GXCountFormatOwners(gxFormat aFormat)
  1076.  FOURWORDINLINE(0x203C, 0x0000, 0x0037, 0xABFE);
  1077.  
  1078. extern pascal void GXGetFormatMapping(gxFormat aFormat, gxMapping *fmtMapping)
  1079.  FOURWORDINLINE(0x203C, 0x0000, 0x0038, 0xABFE);
  1080.  
  1081. extern pascal gxShape GXGetFormatForm(gxFormat aFormat, gxShape *mask)
  1082.  FOURWORDINLINE(0x203C, 0x0000, 0x0039, 0xABFE);
  1083.  
  1084. extern pascal void GXSetFormatForm(gxFormat aFormat, gxShape form, gxShape mask)
  1085.  FOURWORDINLINE(0x203C, 0x0000, 0x003A, 0xABFE);
  1086.  
  1087. /*
  1088.     PaperType Routines
  1089. */
  1090. extern pascal gxPaperType GXNewPaperType(gxJob aJob, Str31 name, gxRectangle *pageSize, gxRectangle *paperSize)
  1091.  FOURWORDINLINE(0x203C, 0x0000, 0x000B, 0xABFE);
  1092.  
  1093. extern pascal void GXDisposePaperType(gxPaperType aPaperType)
  1094.  FOURWORDINLINE(0x203C, 0x0000, 0x000C, 0xABFE);
  1095.  
  1096. extern pascal gxPaperType GXGetNewPaperType(gxJob aJob, short resID)
  1097.  FOURWORDINLINE(0x203C, 0x0000, 0x000D, 0xABFE);
  1098.  
  1099. extern pascal long GXCountJobPaperTypes(gxJob aJob, Boolean forFormatDevice)
  1100.  FOURWORDINLINE(0x203C, 0x0000, 0x0042, 0xABFE);
  1101.  
  1102. extern pascal gxPaperType GXGetJobPaperType(gxJob aJob, long whichPaperType, Boolean forFormatDevice, gxPaperType aPaperType)
  1103.  FOURWORDINLINE(0x203C, 0x0000, 0x0043, 0xABFE);
  1104.  
  1105. extern pascal void GXForEachJobPaperTypeDo(gxJob aJob, GXPaperTypeUPP aProc, void *refCon, Boolean forFormattingPrinter)
  1106.  FOURWORDINLINE(0x203C, 0x0000, 0x0044, 0xABFE);
  1107.  
  1108. extern pascal gxPaperType GXCopyPaperType(gxPaperType srcPaperType, gxPaperType dstPaperType)
  1109.  FOURWORDINLINE(0x203C, 0x0000, 0x0045, 0xABFE);
  1110.  
  1111. extern pascal void GXGetPaperTypeName(gxPaperType aPaperType, Str31 papertypeName)
  1112.  FOURWORDINLINE(0x203C, 0x0000, 0x0046, 0xABFE);
  1113.  
  1114. extern pascal void GXGetPaperTypeDimensions(gxPaperType aPaperType, gxRectangle *pageSize, gxRectangle *paperSize)
  1115.  FOURWORDINLINE(0x203C, 0x0000, 0x0047, 0xABFE);
  1116.  
  1117. extern pascal gxJob GXGetPaperTypeJob(gxPaperType aPaperType)
  1118.  FOURWORDINLINE(0x203C, 0x0000, 0x0048, 0xABFE);
  1119.  
  1120. extern pascal Collection GXGetPaperTypeCollection(gxPaperType aPaperType)
  1121.  FOURWORDINLINE(0x203C, 0x0000, 0x0049, 0xABFE);
  1122.  
  1123. /*
  1124.     Printer Routines
  1125. */
  1126. extern pascal gxPrinter GXGetJobFormattingPrinter(gxJob aJob)
  1127.  FOURWORDINLINE(0x203C, 0x0000, 0x0027, 0xABFE);
  1128.  
  1129. extern pascal gxPrinter GXGetJobOutputPrinter(gxJob aJob)
  1130.  FOURWORDINLINE(0x203C, 0x0000, 0x0028, 0xABFE);
  1131.  
  1132. extern pascal gxPrinter GXGetJobPrinter(gxJob aJob)
  1133.  FOURWORDINLINE(0x203C, 0x0000, 0x0029, 0xABFE);
  1134.  
  1135. extern pascal gxJob GXGetPrinterJob(gxPrinter aPrinter)
  1136.  FOURWORDINLINE(0x203C, 0x0000, 0x002A, 0xABFE);
  1137.  
  1138. extern pascal void GXForEachPrinterViewDeviceDo(gxPrinter aPrinter, GXViewDeviceUPP aProc, void *refCon)
  1139.  FOURWORDINLINE(0x203C, 0x0000, 0x002B, 0xABFE);
  1140.  
  1141. extern pascal long GXCountPrinterViewDevices(gxPrinter aPrinter)
  1142.  FOURWORDINLINE(0x203C, 0x0000, 0x002C, 0xABFE);
  1143.  
  1144. extern pascal gxViewDevice GXGetPrinterViewDevice(gxPrinter aPrinter, long whichViewDevice)
  1145.  FOURWORDINLINE(0x203C, 0x0000, 0x002D, 0xABFE);
  1146.  
  1147. extern pascal void GXSelectPrinterViewDevice(gxPrinter aPrinter, long whichViewDevice)
  1148.  FOURWORDINLINE(0x203C, 0x0000, 0x002E, 0xABFE);
  1149.  
  1150. extern pascal void GXGetPrinterName(gxPrinter aPrinter, Str31 printerName)
  1151.  FOURWORDINLINE(0x203C, 0x0000, 0x002F, 0xABFE);
  1152.  
  1153. extern pascal OSType GXGetPrinterType(gxPrinter aPrinter)
  1154.  FOURWORDINLINE(0x203C, 0x0000, 0x0030, 0xABFE);
  1155.  
  1156. extern pascal void GXGetPrinterDriverName(gxPrinter aPrinter, Str31 driverName)
  1157.  FOURWORDINLINE(0x203C, 0x0000, 0x0031, 0xABFE);
  1158.  
  1159. extern pascal OSType GXGetPrinterDriverType(gxPrinter aPrinter)
  1160.  FOURWORDINLINE(0x203C, 0x0000, 0x0032, 0xABFE);
  1161.  
  1162. /*
  1163.     Dialog Routines
  1164. */
  1165. extern pascal gxDialogResult GXJobDefaultFormatDialog(gxJob aJob, gxEditMenuRecord *anEditMenuRec)
  1166.  FOURWORDINLINE(0x203C, 0x0000, 0x0010, 0xABFE);
  1167.  
  1168. extern pascal gxDialogResult GXJobPrintDialog(gxJob aJob, gxEditMenuRecord *anEditMenuRec)
  1169.  FOURWORDINLINE(0x203C, 0x0000, 0x0011, 0xABFE);
  1170.  
  1171. extern pascal gxDialogResult GXFormatDialog(gxFormat aFormat, gxEditMenuRecord *anEditMenuRec, StringPtr title)
  1172.  FOURWORDINLINE(0x203C, 0x0000, 0x0012, 0xABFE);
  1173.  
  1174. extern pascal void GXEnableJobScalingPanel(gxJob aJob, Boolean enabled)
  1175.  FOURWORDINLINE(0x203C, 0x0000, 0x0040, 0xABFE);
  1176.  
  1177. extern pascal void GXGetJobPanelDimensions(gxJob aJob, Rect *panelArea)
  1178.  FOURWORDINLINE(0x203C, 0x0000, 0x0041, 0xABFE);
  1179.  
  1180. /*
  1181.     Spooling Routines
  1182. */
  1183. extern pascal void GXGetJobPageRange(gxJob theJob, long *firstPage, long *lastPage)
  1184.  FOURWORDINLINE(0x203C, 0x0000, 0x0017, 0xABFE);
  1185.  
  1186. extern pascal void GXStartJob(gxJob theJob, StringPtr docName, long pageCount)
  1187.  FOURWORDINLINE(0x203C, 0x0000, 0x0018, 0xABFE);
  1188.  
  1189. extern pascal void GXPrintPage(gxJob theJob, long pageNumber, gxFormat theFormat, gxShape thePage)
  1190.  FOURWORDINLINE(0x203C, 0x0000, 0x0019, 0xABFE);
  1191.  
  1192. extern pascal Boolean GXStartPage(gxJob theJob, long pageNumber, gxFormat theFormat, long numViewPorts, gxViewPort *viewPortList)
  1193.  FOURWORDINLINE(0x203C, 0x0000, 0x001A, 0xABFE);
  1194.  
  1195. extern pascal void GXFinishPage(gxJob theJob)
  1196.  FOURWORDINLINE(0x203C, 0x0000, 0x001B, 0xABFE);
  1197.  
  1198. extern pascal void GXFinishJob(gxJob theJob)
  1199.  FOURWORDINLINE(0x203C, 0x0000, 0x001C, 0xABFE);
  1200.  
  1201. /*
  1202.     PrintFile Routines
  1203. */
  1204. extern pascal gxPrintFile GXOpenPrintFile(gxJob theJob, FSSpecPtr anFSSpec, char permission)
  1205.  FOURWORDINLINE(0x203C, 0x0000, 0x004A, 0xABFE);
  1206.  
  1207. extern pascal void GXClosePrintFile(gxPrintFile aPrintFile)
  1208.  FOURWORDINLINE(0x203C, 0x0000, 0x004B, 0xABFE);
  1209.  
  1210. extern pascal gxJob GXGetPrintFileJob(gxPrintFile aPrintFile)
  1211.  FOURWORDINLINE(0x203C, 0x0000, 0x004C, 0xABFE);
  1212.  
  1213. extern pascal long GXCountPrintFilePages(gxPrintFile aPrintFile)
  1214.  FOURWORDINLINE(0x203C, 0x0000, 0x004D, 0xABFE);
  1215.  
  1216. extern pascal void GXReadPrintFilePage(gxPrintFile aPrintFile, long pageNumber, long numViewPorts, gxViewPort *viewPortList, gxFormat *pgFormat, gxShape *pgShape)
  1217.  FOURWORDINLINE(0x203C, 0x0000, 0x004E, 0xABFE);
  1218.  
  1219. extern pascal void GXReplacePrintFilePage(gxPrintFile aPrintFile, long pageNumber, gxFormat aFormat, gxShape aShape)
  1220.  FOURWORDINLINE(0x203C, 0x0000, 0x004F, 0xABFE);
  1221.  
  1222. extern pascal void GXInsertPrintFilePage(gxPrintFile aPrintFile, long atPageNumber, gxFormat pgFormat, gxShape pgShape)
  1223.  FOURWORDINLINE(0x203C, 0x0000, 0x0050, 0xABFE);
  1224.  
  1225. extern pascal void GXDeletePrintFilePageRange(gxPrintFile aPrintFile, long fromPageNumber, long toPageNumber)
  1226.  FOURWORDINLINE(0x203C, 0x0000, 0x0051, 0xABFE);
  1227.  
  1228. extern pascal void GXSavePrintFile(gxPrintFile aPrintFile, FSSpec *anFSSpec)
  1229.  FOURWORDINLINE(0x203C, 0x0000, 0x0052, 0xABFE);
  1230.  
  1231. /*
  1232.     ColorSync Routines
  1233. */
  1234. extern pascal long GXFindPrinterProfile(gxPrinter aPrinter, void *searchData, long index, gxColorProfile *returnedProfile)
  1235.  FOURWORDINLINE(0x203C, 0x0000, 0x0053, 0xABFE);
  1236.  
  1237. extern pascal long GXFindFormatProfile(gxFormat aFormat, void *searchData, long index, gxColorProfile *returnedProfile)
  1238.  FOURWORDINLINE(0x203C, 0x0000, 0x0054, 0xABFE);
  1239.  
  1240. extern pascal void GXSetPrinterProfile(gxPrinter aPrinter, gxColorProfile oldProfile, gxColorProfile newProfile)
  1241.  FOURWORDINLINE(0x203C, 0x0000, 0x0055, 0xABFE);
  1242.  
  1243. extern pascal void GXSetFormatProfile(gxFormat aFormat, gxColorProfile oldProfile, gxColorProfile newProfile)
  1244.  FOURWORDINLINE(0x203C, 0x0000, 0x0056, 0xABFE);
  1245.  
  1246. /*
  1247. ***********************************************************************
  1248.                         Start of old "GXPrintingResEquates.h/a/p" interface file.
  1249.                 ************************************************************************
  1250. */
  1251. /*
  1252.     ------------------------------------
  1253.                 Basic client types
  1254.     ------------------------------------ 
  1255. */
  1256.  
  1257. enum {
  1258.     gxPrintingManagerType        = 'pmgr',
  1259.     gxImagingSystemType            = 'gxis',
  1260.     gxPrinterDriverType            = 'pdvr',
  1261.     gxPrintingExtensionType        = 'pext',
  1262.     gxUnknownPrinterType        = 'none',
  1263.     gxAnyPrinterType            = 'univ',
  1264.     gxQuickdrawPrinterType        = 'qdrw',
  1265.     gxPortableDocPrinterType    = 'gxpd',
  1266.     gxRasterPrinterType            = 'rast',
  1267.     gxPostscriptPrinterType        = 'post',
  1268.     gxVectorPrinterType            = 'vect'
  1269. };
  1270.  
  1271. /* All pre-defined printing collection items have this ID */
  1272.  
  1273. enum {
  1274.     gxPrintingTagID                = -28672
  1275. };
  1276.  
  1277. /*
  1278.     ----------------------------------------------------------------------
  1279.  
  1280.         Resource types and IDs used by both extension and driver writers
  1281.  
  1282.     ---------------------------------------------------------------------- 
  1283. */
  1284. /* Resources in a printer driver or extension must be based off of these IDs */
  1285.  
  1286. enum {
  1287.     gxPrintingDriverBaseID        = -27648,
  1288.     gxPrintingExtensionBaseID    = -27136
  1289. };
  1290.  
  1291. /*
  1292.     Override resources tell the system what messages a driver or extension
  1293.         is overriding.  A driver may have a series of these resources. 
  1294. */
  1295. /* Override resource type for 68k resource-based code:*/
  1296.  
  1297. enum {
  1298.     gxOverrideType                = 'over'
  1299. };
  1300.  
  1301. /* Override resource type for PowerPC datafork-based code:*/
  1302.  
  1303. enum {
  1304.     gxNativeOverrideType        = 'povr'
  1305. };
  1306.  
  1307. /*
  1308.     --------------------------------------------------------------
  1309.  
  1310.         Message ID definitions by both extension and driver writers
  1311.  
  1312.     --------------------------------------------------------------- 
  1313. */
  1314. /* Identifiers for universal message overrides. */
  1315.  
  1316. enum {
  1317.     gxInitializeMsg                = 0,
  1318.     gxShutDownMsg                = 1,
  1319.     gxJobIdleMsg                = 2,
  1320.     gxJobStatusMsg                = 3,
  1321.     gxPrintingEventMsg            = 4,
  1322.     gxJobDefaultFormatDialogMsg    = 5,
  1323.     gxFormatDialogMsg            = 6,
  1324.     gxJobPrintDialogMsg            = 7,
  1325.     gxFilterPanelEventMsg        = 8,
  1326.     gxHandlePanelEventMsg        = 9,
  1327.     gxParsePageRangeMsg            = 10,
  1328.     gxDefaultJobMsg                = 11,
  1329.     gxDefaultFormatMsg            = 12,
  1330.     gxDefaultPaperTypeMsg        = 13,
  1331.     gxDefaultPrinterMsg            = 14,
  1332.     gxCreateSpoolFileMsg        = 15,
  1333.     gxSpoolPageMsg                = 16,
  1334.     gxSpoolDataMsg                = 17,
  1335.     gxSpoolResourceMsg            = 18,
  1336.     gxCompleteSpoolFileMsg        = 19,
  1337.     gxCountPagesMsg                = 20,
  1338.     gxDespoolPageMsg            = 21,
  1339.     gxDespoolDataMsg            = 22,
  1340.     gxDespoolResourceMsg        = 23,
  1341.     gxCloseSpoolFileMsg            = 24,
  1342.     gxStartJobMsg                = 25,
  1343.     gxFinishJobMsg                = 26,
  1344.     gxStartPageMsg                = 27,
  1345.     gxFinishPageMsg                = 28,
  1346.     gxPrintPageMsg                = 29,
  1347.     gxSetupImageDataMsg            = 30,
  1348.     gxImageJobMsg                = 31,
  1349.     gxImageDocumentMsg            = 32,
  1350.     gxImagePageMsg                = 33,
  1351.     gxRenderPageMsg                = 34,
  1352.     gxCreateImageFileMsg        = 35,
  1353.     gxOpenConnectionMsg            = 36,
  1354.     gxCloseConnectionMsg        = 37,
  1355.     gxStartSendPageMsg            = 38,
  1356.     gxFinishSendPageMsg            = 39,
  1357.     gxWriteDataMsg                = 40,
  1358.     gxBufferDataMsg                = 41,
  1359.     gxDumpBufferMsg                = 42,
  1360.     gxFreeBufferMsg                = 43,
  1361.     gxCheckStatusMsg            = 44,
  1362.     gxGetDeviceStatusMsg        = 45,
  1363.     gxFetchTaggedDataMsg        = 46,
  1364.     gxGetDTPMenuListMsg            = 47,
  1365.     gxDTPMenuSelectMsg            = 48,
  1366.     gxHandleAlertFilterMsg        = 49,
  1367.     gxJobFormatModeQueryMsg        = 50,
  1368.     gxWriteStatusToDTPWindowMsg    = 51,
  1369.     gxInitializeStatusAlertMsg    = 52,
  1370.     gxHandleAlertStatusMsg        = 53,
  1371.     gxHandleAlertEventMsg        = 54,
  1372.     gxCleanupStartJobMsg        = 55,
  1373.     gxCleanupStartPageMsg        = 56,
  1374.     gxCleanupOpenConnectionMsg    = 57,
  1375.     gxCleanupStartSendPageMsg    = 58,
  1376.     gxDefaultDesktopPrinterMsg    = 59,
  1377.     gxCaptureOutputDeviceMsg    = 60,
  1378.     gxOpenConnectionRetryMsg    = 61,
  1379.     gxExamineSpoolFileMsg        = 62,
  1380.     gxFinishSendPlaneMsg        = 63,
  1381.     gxDoesPaperFitMsg            = 64,
  1382.     gxChooserMessageMsg            = 65,
  1383.     gxFindPrinterProfileMsg        = 66,
  1384.     gxFindFormatProfileMsg        = 67,
  1385.     gxSetPrinterProfileMsg        = 68,
  1386.     gxSetFormatProfileMsg        = 69,
  1387.     gxHandleAltDestinationMsg    = 70,
  1388.     gxSetupPageImageDataMsg        = 71
  1389. };
  1390.  
  1391. /* Identifiers for Quickdraw message overrides. */
  1392.  
  1393. enum {
  1394.     gxPrOpenDocMsg                = 0,
  1395.     gxPrCloseDocMsg                = 1,
  1396.     gxPrOpenPageMsg                = 2,
  1397.     gxPrClosePageMsg            = 3,
  1398.     gxPrintDefaultMsg            = 4,
  1399.     gxPrStlDialogMsg            = 5,
  1400.     gxPrJobDialogMsg            = 6,
  1401.     gxPrStlInitMsg                = 7,
  1402.     gxPrJobInitMsg                = 8,
  1403.     gxPrDlgMainMsg                = 9,
  1404.     gxPrValidateMsg                = 10,
  1405.     gxPrJobMergeMsg                = 11,
  1406.     gxPrGeneralMsg                = 12,
  1407.     gxConvertPrintRecordToMsg    = 13,
  1408.     gxConvertPrintRecordFromMsg    = 14,
  1409.     gxPrintRecordToJobMsg        = 15
  1410. };
  1411.  
  1412. /* Identifiers for raster imaging message overrides. */
  1413.  
  1414. enum {
  1415.     gxRasterDataInMsg            = 0,
  1416.     gxRasterLineFeedMsg            = 1,
  1417.     gxRasterPackageBitmapMsg    = 2
  1418. };
  1419.  
  1420. /* Identifiers for PostScript imaging message overrides. */
  1421.  
  1422. enum {
  1423.     gxPostscriptQueryPrinterMsg    = 0,
  1424.     gxPostscriptInitializePrinterMsg = 1,
  1425.     gxPostscriptResetPrinterMsg    = 2,
  1426.     gxPostscriptExitServerMsg    = 3,
  1427.     gxPostscriptGetStatusTextMsg = 4,
  1428.     gxPostscriptGetPrinterTextMsg = 5,
  1429.     gxPostscriptScanStatusTextMsg = 6,
  1430.     gxPostscriptScanPrinterTextMsg = 7,
  1431.     gxPostscriptGetDocumentProcSetListMsg = 8,
  1432.     gxPostscriptDownloadProcSetListMsg = 9,
  1433.     gxPostscriptGetPrinterGlyphsInformationMsg = 10,
  1434.     gxPostscriptStreamFontMsg    = 11,
  1435.     gxPostscriptDoDocumentHeaderMsg = 12,
  1436.     gxPostscriptDoDocumentSetUpMsg = 13,
  1437.     gxPostscriptDoDocumentTrailerMsg = 14,
  1438.     gxPostscriptDoPageSetUpMsg    = 15,
  1439.     gxPostscriptSelectPaperTypeMsg = 16,
  1440.     gxPostscriptDoPageTrailerMsg = 17,
  1441.     gxPostscriptEjectPageMsg    = 18,
  1442.     gxPostscriptProcessShapeMsg    = 19,
  1443.     gxPostScriptEjectPendingPageMsg = 20
  1444. };
  1445.  
  1446. /* Identifiers for Vector imaging message overrides. */
  1447.  
  1448. enum {
  1449.     gxVectorPackageDataMsg        = 0,
  1450.     gxVectorLoadPensMsg            = 1,
  1451.     gxVectorVectorizeShapeMsg    = 2
  1452. };
  1453.  
  1454. /* Dialog related resource types */
  1455.  
  1456. enum {
  1457.     gxPrintingAlertType            = 'plrt',
  1458.     gxStatusType                = 'stat',
  1459.     gxExtendedDITLType            = 'xdtl',
  1460.     gxPrintPanelType            = 'ppnl',
  1461.     gxCollectionType            = 'cltn'
  1462. };
  1463.  
  1464. /* Communication resource types */
  1465. /*
  1466.     The looker resource is used by the Chooser PACK to determine what kind
  1467.     of communications this driver supports. (In order to generate/handle the 
  1468.     pop-up menu for "Connect via:".
  1469.     
  1470.     The looker resource is also used by PrinterShare to determine the AppleTalk NBP Type
  1471.     for servers created for this driver.
  1472. */
  1473.  
  1474. enum {
  1475.     gxLookerType                = 'look',
  1476.     gxLookerID                    = -4096
  1477. };
  1478.  
  1479. /* The communications method and private data used to connect to the printer */
  1480.  
  1481. enum {
  1482.     gxDeviceCommunicationsType    = 'comm'
  1483. };
  1484.  
  1485. /*
  1486.     -------------------------------------------------
  1487.  
  1488.     Resource types and IDs used by extension writers
  1489.  
  1490.     ------------------------------------------------- 
  1491. */
  1492.  
  1493. enum {
  1494.     gxExtensionUniversalOverrideID = gxPrintingExtensionBaseID
  1495. };
  1496.  
  1497.  
  1498. enum {
  1499.     gxExtensionImagingOverrideSelectorID = gxPrintingExtensionBaseID
  1500. };
  1501.  
  1502.  
  1503. enum {
  1504.     gxExtensionScopeType        = 'scop',
  1505.     gxDriverScopeID                = gxPrintingExtensionBaseID,
  1506.     gxPrinterScopeID            = gxPrintingExtensionBaseID + 1,
  1507.     gxPrinterExceptionScopeID    = gxPrintingExtensionBaseID + 2
  1508. };
  1509.  
  1510.  
  1511. enum {
  1512.     gxExtensionLoadType            = 'load',
  1513.     gxExtensionLoadID            = gxPrintingExtensionBaseID
  1514. };
  1515.  
  1516.  
  1517. enum {
  1518.     gxExtensionLoadFirst        = 0x00000100,
  1519.     gxExtensionLoadAnywhere        = 0x7FFFFFFF,
  1520.     gxExtensionLoadLast            = 0xFFFFFF00
  1521. };
  1522.  
  1523.  
  1524. enum {
  1525.     gxExtensionOptimizationType    = 'eopt',
  1526.     gxExtensionOptimizationID    = gxPrintingExtensionBaseID
  1527. };
  1528.  
  1529. /*
  1530.     -----------------------------------------------
  1531.  
  1532.     Resource types and IDs used by driver writers
  1533.  
  1534.     ----------------------------------------------- 
  1535. */
  1536.  
  1537. enum {
  1538.     gxDriverUniversalOverrideID    = gxPrintingDriverBaseID,
  1539.     gxDriverImagingOverrideID    = gxPrintingDriverBaseID + 1,
  1540.     gxDriverCompatibilityOverrideID = gxPrintingDriverBaseID + 2
  1541. };
  1542.  
  1543.  
  1544. enum {
  1545.     gxDriverFileFormatType        = 'pfil',
  1546.     gxDriverFileFormatID        = gxPrintingDriverBaseID
  1547. };
  1548.  
  1549.  
  1550. enum {
  1551.     gxDestinationAdditionType    = 'dsta',
  1552.     gxDestinationAdditionID        = gxPrintingDriverBaseID
  1553. };
  1554.  
  1555. /* IMAGING RESOURCES */
  1556. /*
  1557.     The imaging system resource specifies which imaging system a printer
  1558.         driver wishes to use. 
  1559. */
  1560.  
  1561. enum {
  1562.     gxImagingSystemSelectorType    = 'isys',
  1563.     gxImagingSystemSelectorID    = gxPrintingDriverBaseID
  1564. };
  1565.  
  1566. /* 'exft' resource ID -- exclude font list */
  1567.  
  1568. enum {
  1569.     kExcludeFontListType        = 'exft',
  1570.     kExcludeFontListID            = gxPrintingDriverBaseID
  1571. };
  1572.  
  1573. /* Resource for type for color matching */
  1574.  
  1575. enum {
  1576.     gxColorMatchingDataType        = 'prof',
  1577.     gxColorMatchingDataID        = gxPrintingDriverBaseID
  1578. };
  1579.  
  1580. /* Resource type and id for the tray count */
  1581.  
  1582. enum {
  1583.     gxTrayCountDataType            = 'tray',
  1584.     gxTrayCountDataID            = gxPrintingDriverBaseID
  1585. };
  1586.  
  1587. /* Resource type for the tray names */
  1588.  
  1589. enum {
  1590.     gxTrayNameDataType            = 'tryn'
  1591. };
  1592.  
  1593. /* Resource type for manual feed preferences, stored in DTP. */
  1594.  
  1595. enum {
  1596.     gxManualFeedAlertPrefsType    = 'mfpr',
  1597.     gxManualFeedAlertPrefsID    = gxPrintingDriverBaseID
  1598. };
  1599.  
  1600. /* Resource type for desktop printer output characteristics, stored in DTP. */
  1601.  
  1602. enum {
  1603.     gxDriverOutputType            = 'outp',
  1604.     gxDriverOutputTypeID        = 1
  1605. };
  1606.  
  1607. /* IO Resources */
  1608. /* Resource type and ID for default IO and buffering resources */
  1609.  
  1610. enum {
  1611.     gxUniversalIOPrefsType        = 'iobm',
  1612.     gxUniversalIOPrefsID        = gxPrintingDriverBaseID
  1613. };
  1614.  
  1615. /*
  1616.     Resource types and IDs for default implementation of CaptureOutputDevice.
  1617.         The default implementation of CaptureOutputDevice only handles PAP devices 
  1618. */
  1619.  
  1620. enum {
  1621.     gxCaptureType                = 'cpts',
  1622.     gxCaptureStringID            = gxPrintingDriverBaseID,
  1623.     gxReleaseStringID            = gxPrintingDriverBaseID + 1,
  1624.     gxUncapturedAppleTalkType    = gxPrintingDriverBaseID + 2,
  1625.     gxCapturedAppleTalkType        = gxPrintingDriverBaseID + 3
  1626. };
  1627.  
  1628. /* Resource type and ID for custom halftone matrix */
  1629.  
  1630. enum {
  1631.     gxCustomMatrixType            = 'dmat',
  1632.     gxCustomMatrixID            = gxPrintingDriverBaseID
  1633. };
  1634.  
  1635. /* Resource type and ID for raster driver rendering preferences */
  1636.  
  1637. enum {
  1638.     gxRasterPrefsType            = 'rdip',
  1639.     gxRasterPrefsID                = gxPrintingDriverBaseID
  1640. };
  1641.  
  1642. /* Resource type for specifiying a colorset */
  1643.  
  1644. enum {
  1645.     gxColorSetResType            = 'crst'
  1646. };
  1647.  
  1648. /* Resource type and ID for raster driver packaging preferences */
  1649.  
  1650. enum {
  1651.     gxRasterPackType            = 'rpck',
  1652.     gxRasterPackID                = gxPrintingDriverBaseID
  1653. };
  1654.  
  1655. /* Resource type and ID for raster driver packaging options */
  1656.  
  1657. enum {
  1658.     gxRasterNumNone                = 0,                            /* Number isn't output at all */
  1659.     gxRasterNumDirect            = 1,                            /* Lowest minWidth bytes as data */
  1660.     gxRasterNumToASCII            = 2                                /* minWidth ASCII characters */
  1661. };
  1662.  
  1663.  
  1664. enum {
  1665.     gxRasterPackOptionsType        = 'ropt',
  1666.     gxRasterPackOptionsID        = gxPrintingDriverBaseID
  1667. };
  1668.  
  1669. /* Resource type for the PostScript imaging system procedure set control resource */
  1670.  
  1671. enum {
  1672.     gxPostscriptProcSetControlType = 'prec'
  1673. };
  1674.  
  1675. /* Resource type for the PostScript imaging system printer font resource */
  1676.  
  1677. enum {
  1678.     gxPostscriptPrinterFontType    = 'pfnt'
  1679. };
  1680.  
  1681. /* Resource type and ID for the PostScript imaging system imaging preferences */
  1682.  
  1683. enum {
  1684.     gxPostscriptPrefsType        = 'pdip',
  1685.     gxPostscriptPrefsID            = gxPrintingDriverBaseID
  1686. };
  1687.  
  1688. /* Resource type and ID for the PostScript imaging system default scanning code */
  1689.  
  1690. enum {
  1691.     gxPostscriptScanningType    = 'scan',
  1692.     gxPostscriptScanningID        = gxPrintingDriverBaseID
  1693. };
  1694.  
  1695. /* Old Application Support Resources */
  1696.  
  1697. enum {
  1698.     gxCustType                    = 'cust',
  1699.     gxCustID                    = -8192
  1700. };
  1701.  
  1702.  
  1703. enum {
  1704.     gxReslType                    = 'resl',
  1705.     gxReslID                    = -8192
  1706. };
  1707.  
  1708.  
  1709. enum {
  1710.     gxDiscreteResolution        = 0
  1711. };
  1712.  
  1713.  
  1714. enum {
  1715.     gxStlDialogResID            = -8192
  1716. };
  1717.  
  1718.  
  1719. enum {
  1720.     gxJobDialogResID            = -8191
  1721. };
  1722.  
  1723.  
  1724. enum {
  1725.     gxScaleTableType            = 'stab',
  1726.     gxDITLControlType            = 'dctl'
  1727. };
  1728.  
  1729. /*
  1730.     The default implementation of gxPrintDefault loads and
  1731.     PrValidates a print record stored in the following driver resource. 
  1732. */
  1733.  
  1734. enum {
  1735.     gxPrintRecordType            = 'PREC',
  1736.     gxDefaultPrintRecordID        = 0
  1737. };
  1738.  
  1739. /*
  1740.     -----------------------------------------------
  1741.  
  1742.     Resource types and IDs used in papertype files
  1743.  
  1744.     -----------------------------------------------
  1745. */
  1746. /* Resource type and ID for driver papertypes placed in individual files */
  1747.  
  1748. enum {
  1749.     gxSignatureType                = 'sig ',
  1750.     gxPapertypeSignatureID        = 0
  1751. };
  1752.  
  1753. /* Papertype creator types */
  1754.  
  1755. enum {
  1756.     gxDrvrPaperType                = 'drpt',
  1757.     gxSysPaperType                = 'sypt',                        /* System paper type creator */
  1758.     gxUserPaperType                = 'uspt',                        /* User paper type creator */
  1759.                                                                 /* Driver creator types == driver file's creator value */
  1760.     gxPaperTypeType                = 'ptyp'
  1761. };
  1762.  
  1763. /*
  1764. ********************************************************************
  1765.                     Start of old "GXPrintingMessages.h/a/p" interface file.
  1766.             *********************************************************************
  1767. */
  1768. /*
  1769.  ------------------------------------------------------------------------------
  1770.  
  1771.                                     Constants and Types
  1772.  
  1773. -------------------------------------------------------------------------------- 
  1774. */
  1775. /*
  1776.  
  1777.     ABSTRACT DATA TYPES
  1778.  
  1779. */
  1780. typedef struct OpaquegxSpoolFile* gxSpoolFile;
  1781. /*
  1782.  
  1783.     DIALOG PANEL CONSTANTS AND TYPES
  1784.  
  1785. */
  1786. typedef long gxPanelEvent;
  1787. /* Dialog panel event equates */
  1788.  
  1789. enum {
  1790.     gxPanelNoEvt                = 0L,
  1791.     gxPanelOpenEvt                = 1L,                            /* Initialize and draw */
  1792.     gxPanelCloseEvt                = 2L,                            /* Your panel is going away (panel switchL, confirm or cancel) */
  1793.     gxPanelHitEvt                = 3L,                            /* There's a hit in your panel */
  1794.     gxPanelActivateEvt            = 4L,                            /* The dialog window has just been activated */
  1795.     gxPanelDeactivateEvt        = 5L,                            /* The dialog window is about to be deactivated */
  1796.     gxPanelIconFocusEvt            = 6L,                            /* The focus changes from the panel to the icon list */
  1797.     gxPanelPanelFocusEvt        = 7L,                            /* The focus changes from the icon list to the panel */
  1798.     gxPanelFilterEvt            = 8L,                            /* Every event is filtered */
  1799.     gxPanelCancelEvt            = 9L,                            /* The user has cancelled the dialog */
  1800.     gxPanelConfirmEvt            = 10L,                            /* The user has confirmed the dialog */
  1801.     gxPanelDialogEvt            = 11L,                            /* Event to be handle by dialoghandler */
  1802.     gxPanelOtherEvt                = 12L,                            /* osEvts, etc. */
  1803.     gxPanelUserWillConfirmEvt    = 13L                            /* User has selected confirm, time to parse panel interdependencies */
  1804. };
  1805.  
  1806. /* Constants for panel responses to dialog handler calls */
  1807. typedef long gxPanelResult;
  1808.  
  1809. enum {
  1810.     gxPanelNoResult                = 0,
  1811.     gxPanelCancelConfirmation    = 1                                /* Only valid from panelUserWillConfirmEvt - used to keep the dialog from going away */
  1812. };
  1813.  
  1814. /* Panel event info record for FilterPanelEvent and HandlePanelEvent messages */
  1815. struct gxPanelInfoRecord {
  1816.     gxPanelEvent                     panelEvt;                    /* Why we were called */
  1817.     short                             panelResId;                    /* 'ppnl' resource ID of current panel */
  1818.     DialogPtr                         pDlg;                        /* Pointer to dialog */
  1819.     EventRecord *                    theEvent;                    /* Pointer to event */
  1820.     short                             itemHit;                    /* Actual item number as Dialog Mgr thinks */
  1821.     short                             itemCount;                    /* Number of items before your items */
  1822.     short                             evtAction;                    /* Once this event is processed, the action that will result */
  1823.                                                                 /* (evtAction is only meaningful during filtering) */
  1824.     short                             errorStringId;                /* STR ID of string to put in error alert (0 means no string) */
  1825.     gxFormat                         theFormat;                    /* The current format (only meaningful in a format dialog) */
  1826.     void *                            refCon;                        /* refCon passed in PanelSetupRecord */
  1827. };
  1828. typedef struct gxPanelInfoRecord gxPanelInfoRecord;
  1829.  
  1830. /* Constants for the evtAction field in PanelInfoRecord */
  1831.  
  1832. enum {
  1833.     gxOtherAction                = 0,                            /* Current item will not change */
  1834.     gxClosePanelAction            = 1,                            /* Panel will be closed */
  1835.     gxCancelDialogAction        = 2,                            /* Dialog will be cancelled */
  1836.     gxConfirmDialogAction        = 3                                /* Dialog will be confirmed */
  1837. };
  1838.  
  1839. /* Constants for the panelKind field in gxPanelSetupRecord */
  1840. typedef long gxPrintingPanelKind;
  1841. /* The gxPanelSetupInfo structure is passed to GXSetupDialogPanel */
  1842. struct gxPanelSetupRecord {
  1843.     gxPrintingPanelKind             panelKind;
  1844.     short                             panelResId;
  1845.     short                             resourceRefNum;
  1846.     void *                            refCon;
  1847. };
  1848. typedef struct gxPanelSetupRecord gxPanelSetupRecord;
  1849.  
  1850.  
  1851. enum {
  1852.     gxApplicationPanel            = 0L,
  1853.     gxExtensionPanel            = 1L,
  1854.     gxDriverPanel                = 2L
  1855. };
  1856.  
  1857. /* Constants returned by gxParsePageRange message */
  1858. typedef long gxParsePageRangeResult;
  1859.  
  1860. enum {
  1861.     gxRangeNotParsed            = 0L,                            /* Default initial value */
  1862.     gxRangeParsed                = 1L,                            /* Range has been parsed */
  1863.     gxRangeBadFromValue            = 2L,                            /* From value is bad */
  1864.     gxRangeBadToValue            = 3L                            /* To value is bad */
  1865. };
  1866.  
  1867. /*
  1868.  
  1869.     STATUS-RELATED CONSTANTS AND TYPES
  1870.  
  1871. */
  1872. /* Structure for status messages */
  1873. struct gxStatusRecord {
  1874.     unsigned short                     statusType;                    /* One of the ids listed above (nonFatalError, etc. ) */
  1875.     unsigned short                     statusId;                    /* Specific status (out of paper, etc.) */
  1876.     unsigned short                     statusAlertId;                /*    Printing alert ID (if any) for status */
  1877.     gxOwnerSignature                 statusOwner;                /* Creator type of status owner */
  1878.     short                             statResId;                    /* ID for 'stat' resource */
  1879.     short                             statResIndex;                /* Index into 'stat' resource for this status */
  1880.     short                             dialogResult;                /* ID of button string selected on dismissal of printing alert */
  1881.     unsigned short                     bufferLen;                    /* Number of bytes in status buffer - total record size must be <= 512 */
  1882.     char                             statusBuffer[1];            /* User response from alert */
  1883. };
  1884. typedef struct gxStatusRecord gxStatusRecord;
  1885.  
  1886. /* Constants for statusType field of gxStatusRecord */
  1887.  
  1888. enum {
  1889.     gxNonFatalError                = 1,                            /* An error occurred, but the job can continue */
  1890.     gxFatalError                = 2,                            /* A fatal error occurred-- halt job */
  1891.     gxPrinterReady                = 3,                            /* Tells QDGX to leave alert mode */
  1892.     gxUserAttention                = 4,                            /* Signals initiation of a modal alert */
  1893.     gxUserAlert                    = 5,                            /* Signals initiation of a moveable modal alert */
  1894.     gxPageTransmission            = 6,                            /* Signals page sent to printer, increments page count in strings to user */
  1895.     gxOpenConnectionStatus        = 7,                            /* Signals QDGX to begin animation on printer icon */
  1896.     gxInformationalStatus        = 8,                            /* Default status type, no side effects */
  1897.     gxSpoolingPageStatus        = 9,                            /* Signals page spooled, increments page count in spooling dialog */
  1898.     gxEndStatus                    = 10,                            /* Signals end of spooling */
  1899.     gxPercentageStatus            = 11                            /* Signals QDGX as to the amount of the job which is currently complete */
  1900. };
  1901.  
  1902. /* Structure for gxWriteStatusToDTPWindow message */
  1903. struct gxDisplayRecord {
  1904.     Boolean                         useText;                    /* Use text as opposed to a picture */
  1905.     char                             padByte;
  1906.     Handle                             hPicture;                    /* if !useText, the picture handle */
  1907.     Str255                             theText;                    /* if useText, the text */
  1908. };
  1909. typedef struct gxDisplayRecord gxDisplayRecord;
  1910.  
  1911. /*-----------------------------------------------*/
  1912. /* paper mapping-related constants and types...  */
  1913. /*-----------------------------------------------*/
  1914. typedef long gxTrayMapping;
  1915.  
  1916. enum {
  1917.     gxDefaultTrayMapping        = 0L,
  1918.     gxConfiguredTrayMapping        = 1L
  1919. };
  1920.  
  1921. /*
  1922.  ------------------------------------------------------------------------------
  1923.  
  1924.                 API Functions callable only from within message overrides
  1925.  
  1926. -------------------------------------------------------------------------------- 
  1927. */
  1928. #define GXPRINTINGDISPATCH(segID, selector) {0x203C, 0x0001, 0, 0x223C, (segID & 0x0FFF), selector << 2, 0xABFE}
  1929. /*
  1930.     Message Sending API Routines
  1931. */
  1932. #if !GENERATINGPOWERPC
  1933. extern OSErr GXPrintingDispatch(long selector, ...)
  1934.  SIXWORDINLINE(0x221F, 0x203C, 0x0001, 0x0000, 0xABFE, 0x598F);
  1935.  
  1936. #endif
  1937. /*
  1938.  
  1939.     How to use the GXPRINTINGDISPATCH macro...
  1940.     
  1941.     If your driver or extension is large, you may want to segment it
  1942.     across smaller boundaries than is permitted by the messaging system.
  1943.     Without using the Printing Manager's segmentation manager directly,
  1944.     the smallest segment you can create consists of the code to override
  1945.     a single message.  If you are overriding workhorse messages such as
  1946.     RenderPage, you may want to divide up the work among many functions
  1947.     distributed across several segments.  Here's how...
  1948.     
  1949.     The Printing Manager segment scheme involves the construction of a
  1950.     single 32-bit dispatch selector, which contains all the information
  1951.     necessary for the dispatcher to find a single routine.  It contains the
  1952.     segment's resource ID, and the offset within the segment which contains
  1953.     the start of the routine.  The GXPRINTINGDISPATCH macro will construct the
  1954.     dispatch selector for you, as well as the code to do the dispatch.
  1955.     
  1956.     Usually, it is convenient to start your segment with a long aligned jump table,
  1957.     beginning after the 4 byte header required by the Printing Manager.  The
  1958.     macro assumes this is the case and takes a 1-based routine selector from
  1959.     which it conmstructs the offset.
  1960.     
  1961.     For example, if your code is in resource 'pdvr' (print driver), ID=2
  1962.     at offset=12 (third routine in segment), you would declare your
  1963.     routine as follows:
  1964.     
  1965.     OSErr MyRenderingRoutine (long param1, Ptr param2)
  1966.         = GXPRINTINGDISPATCH(2, 3);
  1967.         
  1968.     Remember, ALL segment dispatches must return OSErr.  If your routine
  1969.     does not generate errors, you must still declare it to return OSErr
  1970.     and have the routine itself return noErr.
  1971.     
  1972.     An alternative way to call across segments is to call the GXPrintingDispatch
  1973.     function directly.  You must construct the 32-bit selector yourself and pass
  1974.     it as the first parameter.  This is usually not preferable since you don't get
  1975.     type-checking unless you declare a prototype as shown above, and your code
  1976.     isn't as easy to read.
  1977.     
  1978.     So given the above prototype, there are two ways to call the function:
  1979.     
  1980.         anErr = MyRenderingRoutine(p1, p2);            // Free type checking!
  1981.         
  1982.     or:
  1983.     
  1984.         #define kMyRenderRoutineSelector 0x0002000C
  1985.         anErr = GXPrintingDispatch(kMyRenderRoutineSelector, p1, p2);        // No type-checking!
  1986.     
  1987.     
  1988.     Both have the same effect.
  1989.  
  1990. */
  1991. extern gxJob GXGetJob(void )
  1992.  FOURWORDINLINE(0x203C, 0x0001, 0x0001, 0xABFE);
  1993.  
  1994. extern short GXGetMessageHandlerResFile(void )
  1995.  FOURWORDINLINE(0x203C, 0x0001, 0x0002, 0xABFE);
  1996.  
  1997. extern Boolean GXSpoolingAborted(void )
  1998.  FOURWORDINLINE(0x203C, 0x0001, 0x0003, 0xABFE);
  1999.  
  2000. extern OSErr GXJobIdle(void )
  2001.  FOURWORDINLINE(0x203C, 0x0001, 0x0004, 0xABFE);
  2002.  
  2003. extern OSErr GXReportStatus(long statusID, unsigned long statusIndex)
  2004.  FOURWORDINLINE(0x203C, 0x0001, 0x0005, 0xABFE);
  2005.  
  2006. extern OSErr GXAlertTheUser(gxStatusRecord *statusRec)
  2007.  FOURWORDINLINE(0x203C, 0x0001, 0x0006, 0xABFE);
  2008.  
  2009. extern OSErr GXSetupDialogPanel(gxPanelSetupRecord *panelRec)
  2010.  FOURWORDINLINE(0x203C, 0x0001, 0x0007, 0xABFE);
  2011.  
  2012. extern OSErr GXCountTrays(gxTrayIndex *numTrays)
  2013.  FOURWORDINLINE(0x203C, 0x0001, 0x0008, 0xABFE);
  2014.  
  2015. extern OSErr GXGetTrayName(gxTrayIndex trayNumber, Str31 trayName)
  2016.  FOURWORDINLINE(0x203C, 0x0001, 0x0009, 0xABFE);
  2017.  
  2018. extern OSErr GXSetTrayPaperType(gxTrayIndex whichTray, gxPaperType aPapertype)
  2019.  FOURWORDINLINE(0x203C, 0x0001, 0x000A, 0xABFE);
  2020.  
  2021. extern OSErr GXGetTrayPaperType(gxTrayIndex whichTray, gxPaperType aPapertype)
  2022.  FOURWORDINLINE(0x203C, 0x0001, 0x000B, 0xABFE);
  2023.  
  2024. extern OSErr GXGetTrayMapping(gxTrayMapping *trayMapping)
  2025.  FOURWORDINLINE(0x203C, 0x0001, 0x000C, 0xABFE);
  2026.  
  2027. extern void GXCleanupStartJob(void )
  2028.  FOURWORDINLINE(0x203C, 0x0001, 0x000D, 0xABFE);
  2029.  
  2030. extern void GXCleanupStartPage(void )
  2031.  FOURWORDINLINE(0x203C, 0x0001, 0x000E, 0xABFE);
  2032.  
  2033. extern void GXCleanupOpenConnection(void )
  2034.  FOURWORDINLINE(0x203C, 0x0001, 0x000F, 0xABFE);
  2035.  
  2036. extern void GXCleanupStartSendPage(void )
  2037.  FOURWORDINLINE(0x203C, 0x0001, 0x0010, 0xABFE);
  2038.  
  2039. /*
  2040.  ------------------------------------------------------------------------------
  2041.  
  2042.                     Constants and types for Universal Printing Messages
  2043.  
  2044. -------------------------------------------------------------------------------- 
  2045. */
  2046. /* Options for gxCreateSpoolFile message */
  2047.  
  2048. enum {
  2049.     gxNoCreateOptions            = 0x00000000,                    /* Just create the file */
  2050.     gxInhibitAlias                = 0x00000001,                    /* Do not create an alias in the PMD folder */
  2051.     gxInhibitUniqueName            = 0x00000002,                    /* Do not append to the filename to make it unique */
  2052.     gxResolveBitmapAlias        = 0x00000004                    /* Resolve bitmap aliases and duplicate data in file */
  2053. };
  2054.  
  2055. /* Options for gxCloseSpoolFile message */
  2056.  
  2057. enum {
  2058.     gxNoCloseOptions            = 0x00000000,                    /* Just close the file */
  2059.     gxDeleteOnClose                = 0x00000001,                    /* Delete the file rather than closing it */
  2060.     gxUpdateJobData                = 0x00000002,                    /* Write current job information into file prior to closing */
  2061.     gxMakeRemoteFile            = 0x00000004                    /* Mark job as a remote file */
  2062. };
  2063.  
  2064. /* Options for gxCreateImageFile message */
  2065.  
  2066. enum {
  2067.     gxNoImageFile                = 0x00000000,                    /* Don't create image file */
  2068.     gxMakeImageFile                = 0x00000001,                    /* Create an image file */
  2069.     gxEachPlane                    = 0x00000002,                    /* Only save up planes before rewinding */
  2070.     gxEachPage                    = 0x00000004,                    /* Save up entire pages before rewinding */
  2071.     gxEntireFile                = gxEachPlane + gxEachPage        /* Save up the entire file before rewinding */
  2072. };
  2073.  
  2074. /* Options for gxBufferData message */
  2075.  
  2076. enum {
  2077.     gxNoBufferOptions            = 0x00000000,
  2078.     gxMakeBufferHex                = 0x00000001,
  2079.     gxDontSplitBuffer            = 0x00000002
  2080. };
  2081.  
  2082. /* Structure for gxDumpBuffer and gxFreeBuffer messages */
  2083. struct gxPrintingBuffer {
  2084.     long                             size;                        /* Size of buffer in bytes */
  2085.     long                             userData;                    /* Client assigned id for the buffer */
  2086.     char                             data[1];                    /* Array of size bytes */
  2087. };
  2088. typedef struct gxPrintingBuffer gxPrintingBuffer;
  2089.  
  2090. /* Structure for gxRenderPage message */
  2091. struct gxPageInfoRecord {
  2092.     long                             docPageNum;                    /* Number of page being printed */
  2093.     long                             copyNum;                    /* Copy number being printed */
  2094.     Boolean                         formatChanged;                /* True if format changed from last page */
  2095.     Boolean                         pageChanged;                /* True if page contents changed from last page */
  2096.     long                             internalUse;                /* Private */
  2097. };
  2098. typedef struct gxPageInfoRecord gxPageInfoRecord;
  2099.  
  2100. /*
  2101.  ------------------------------------------------------------------------------
  2102.  
  2103.                                 Universal Printing Messages
  2104.  
  2105. -------------------------------------------------------------------------------- 
  2106. */
  2107. typedef OSErr (*GXJobIdleProcPtr)(void );
  2108.  
  2109. #if GENERATINGCFM
  2110. typedef UniversalProcPtr GXJobIdleUPP;
  2111. #else
  2112. typedef GXJobIdleProcPtr GXJobIdleUPP;
  2113. #endif
  2114.  
  2115. enum {
  2116.     uppGXJobIdleProcInfo = kCStackBased
  2117.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2118. };
  2119.  
  2120. #if GENERATINGCFM
  2121. #define NewGXJobIdleProc(userRoutine)        \
  2122.         (GXJobIdleUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobIdleProcInfo, GetCurrentArchitecture())
  2123. #else
  2124. #define NewGXJobIdleProc(userRoutine)        \
  2125.         ((GXJobIdleUPP) (userRoutine))
  2126. #endif
  2127.  
  2128. #if GENERATINGCFM
  2129. #define CallGXJobIdleProc(userRoutine)        \
  2130.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXJobIdleProcInfo)
  2131. #else
  2132. #define CallGXJobIdleProc(userRoutine)        \
  2133.         (*(userRoutine))()
  2134. #endif
  2135. #define Send_GXJobIdle() SendMessage(0x00000002)
  2136. #define Forward_GXJobIdle() ForwardThisMessage((void *) (0))
  2137. typedef OSErr (*GXJobStatusProcPtr)(gxStatusRecord *pStatus);
  2138.  
  2139. #if GENERATINGCFM
  2140. typedef UniversalProcPtr GXJobStatusUPP;
  2141. #else
  2142. typedef GXJobStatusProcPtr GXJobStatusUPP;
  2143. #endif
  2144.  
  2145. enum {
  2146.     uppGXJobStatusProcInfo = kCStackBased
  2147.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2148.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStatusRecord *)))
  2149. };
  2150.  
  2151. #if GENERATINGCFM
  2152. #define NewGXJobStatusProc(userRoutine)        \
  2153.         (GXJobStatusUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobStatusProcInfo, GetCurrentArchitecture())
  2154. #else
  2155. #define NewGXJobStatusProc(userRoutine)        \
  2156.         ((GXJobStatusUPP) (userRoutine))
  2157. #endif
  2158.  
  2159. #if GENERATINGCFM
  2160. #define CallGXJobStatusProc(userRoutine, pStatus)        \
  2161.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXJobStatusProcInfo, (pStatus))
  2162. #else
  2163. #define CallGXJobStatusProc(userRoutine, pStatus)        \
  2164.         (*(userRoutine))((pStatus))
  2165. #endif
  2166. #define Send_GXJobStatus(pStatus) \
  2167.           SendMessage(0x00000003, pStatus)
  2168.  
  2169. #define Forward_GXJobStatus(pStatus) \
  2170.           ForwardThisMessage((void *) (pStatus))
  2171. typedef OSErr (*GXPrintingEventProcPtr)(EventRecord *evtRecord, Boolean filterEvent);
  2172.  
  2173. #if GENERATINGCFM
  2174. typedef UniversalProcPtr GXPrintingEventUPP;
  2175. #else
  2176. typedef GXPrintingEventProcPtr GXPrintingEventUPP;
  2177. #endif
  2178.  
  2179. enum {
  2180.     uppGXPrintingEventProcInfo = kCStackBased
  2181.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2182.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(EventRecord *)))
  2183.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Boolean)))
  2184. };
  2185.  
  2186. #if GENERATINGCFM
  2187. #define NewGXPrintingEventProc(userRoutine)        \
  2188.         (GXPrintingEventUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintingEventProcInfo, GetCurrentArchitecture())
  2189. #else
  2190. #define NewGXPrintingEventProc(userRoutine)        \
  2191.         ((GXPrintingEventUPP) (userRoutine))
  2192. #endif
  2193.  
  2194. #if GENERATINGCFM
  2195. #define CallGXPrintingEventProc(userRoutine, evtRecord, filterEvent)        \
  2196.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXPrintingEventProcInfo, (evtRecord), (filterEvent))
  2197. #else
  2198. #define CallGXPrintingEventProc(userRoutine, evtRecord, filterEvent)        \
  2199.         (*(userRoutine))((evtRecord), (filterEvent))
  2200. #endif
  2201. #define Send_GXPrintingEvent(evtRecord, filterEvent) \
  2202.           SendMessage(0x00000004, evtRecord, filterEvent)
  2203.  
  2204. #define Forward_GXPrintingEvent(evtRecord, filterEvent) \
  2205.           ForwardThisMessage((void *) (evtRecord), (void *) (filterEvent))
  2206. typedef OSErr (*GXJobDefaultFormatDialogProcPtr)(gxDialogResult *dlgResult);
  2207.  
  2208. #if GENERATINGCFM
  2209. typedef UniversalProcPtr GXJobDefaultFormatDialogUPP;
  2210. #else
  2211. typedef GXJobDefaultFormatDialogProcPtr GXJobDefaultFormatDialogUPP;
  2212. #endif
  2213.  
  2214. enum {
  2215.     uppGXJobDefaultFormatDialogProcInfo = kCStackBased
  2216.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2217.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxDialogResult *)))
  2218. };
  2219.  
  2220. #if GENERATINGCFM
  2221. #define NewGXJobDefaultFormatDialogProc(userRoutine)        \
  2222.         (GXJobDefaultFormatDialogUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobDefaultFormatDialogProcInfo, GetCurrentArchitecture())
  2223. #else
  2224. #define NewGXJobDefaultFormatDialogProc(userRoutine)        \
  2225.         ((GXJobDefaultFormatDialogUPP) (userRoutine))
  2226. #endif
  2227.  
  2228. #if GENERATINGCFM
  2229. #define CallGXJobDefaultFormatDialogProc(userRoutine, dlgResult)        \
  2230.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXJobDefaultFormatDialogProcInfo, (dlgResult))
  2231. #else
  2232. #define CallGXJobDefaultFormatDialogProc(userRoutine, dlgResult)        \
  2233.         (*(userRoutine))((dlgResult))
  2234. #endif
  2235. #define Send_GXJobDefaultFormatDialog(dlgResult) \
  2236.           SendMessage(0x00000005, dlgResult)
  2237.  
  2238. #define Forward_GXJobDefaultFormatDialog(dlgResult) \
  2239.           ForwardThisMessage((void *) (dlgResult))
  2240. typedef OSErr (*GXFormatDialogProcPtr)(gxFormat theFormat, StringPtr title, gxDialogResult *dlgResult);
  2241.  
  2242. #if GENERATINGCFM
  2243. typedef UniversalProcPtr GXFormatDialogUPP;
  2244. #else
  2245. typedef GXFormatDialogProcPtr GXFormatDialogUPP;
  2246. #endif
  2247.  
  2248. enum {
  2249.     uppGXFormatDialogProcInfo = kCStackBased
  2250.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2251.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  2252.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(StringPtr)))
  2253.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxDialogResult *)))
  2254. };
  2255.  
  2256. #if GENERATINGCFM
  2257. #define NewGXFormatDialogProc(userRoutine)        \
  2258.         (GXFormatDialogUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFormatDialogProcInfo, GetCurrentArchitecture())
  2259. #else
  2260. #define NewGXFormatDialogProc(userRoutine)        \
  2261.         ((GXFormatDialogUPP) (userRoutine))
  2262. #endif
  2263.  
  2264. #if GENERATINGCFM
  2265. #define CallGXFormatDialogProc(userRoutine, theFormat, title, dlgResult)        \
  2266.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFormatDialogProcInfo, (theFormat), (title), (dlgResult))
  2267. #else
  2268. #define CallGXFormatDialogProc(userRoutine, theFormat, title, dlgResult)        \
  2269.         (*(userRoutine))((theFormat), (title), (dlgResult))
  2270. #endif
  2271. #define Send_GXFormatDialog(theFormat, title, dlgResult) \
  2272.           SendMessage(0x00000006, theFormat, title, dlgResult)
  2273.  
  2274. #define Forward_GXFormatDialog(theFormat, title, dlgResult) \
  2275.           ForwardThisMessage((void *) (theFormat),(void *) (title),(void *) (dlgResult))
  2276. typedef OSErr (*GXJobPrintDialogProcPtr)(gxDialogResult *dlgResult);
  2277.  
  2278. #if GENERATINGCFM
  2279. typedef UniversalProcPtr GXJobPrintDialogUPP;
  2280. #else
  2281. typedef GXJobPrintDialogProcPtr GXJobPrintDialogUPP;
  2282. #endif
  2283.  
  2284. enum {
  2285.     uppGXJobPrintDialogProcInfo = kCStackBased
  2286.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2287.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxDialogResult *)))
  2288. };
  2289.  
  2290. #if GENERATINGCFM
  2291. #define NewGXJobPrintDialogProc(userRoutine)        \
  2292.         (GXJobPrintDialogUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobPrintDialogProcInfo, GetCurrentArchitecture())
  2293. #else
  2294. #define NewGXJobPrintDialogProc(userRoutine)        \
  2295.         ((GXJobPrintDialogUPP) (userRoutine))
  2296. #endif
  2297.  
  2298. #if GENERATINGCFM
  2299. #define CallGXJobPrintDialogProc(userRoutine, dlgResult)        \
  2300.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXJobPrintDialogProcInfo, (dlgResult))
  2301. #else
  2302. #define CallGXJobPrintDialogProc(userRoutine, dlgResult)        \
  2303.         (*(userRoutine))((dlgResult))
  2304. #endif
  2305. #define Send_GXJobPrintDialog(dlgResult) \
  2306.           SendMessage(0x00000007, dlgResult)
  2307.  
  2308. #define Forward_GXJobPrintDialog(dlgResult) \
  2309.           ForwardThisMessage((void *) (dlgResult))
  2310. typedef OSErr (*GXFilterPanelEventProcPtr)(gxPanelInfoRecord *pHitInfo, Boolean *returnImmed);
  2311.  
  2312. #if GENERATINGCFM
  2313. typedef UniversalProcPtr GXFilterPanelEventUPP;
  2314. #else
  2315. typedef GXFilterPanelEventProcPtr GXFilterPanelEventUPP;
  2316. #endif
  2317.  
  2318. enum {
  2319.     uppGXFilterPanelEventProcInfo = kCStackBased
  2320.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2321.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPanelInfoRecord *)))
  2322.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Boolean *)))
  2323. };
  2324.  
  2325. #if GENERATINGCFM
  2326. #define NewGXFilterPanelEventProc(userRoutine)        \
  2327.         (GXFilterPanelEventUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFilterPanelEventProcInfo, GetCurrentArchitecture())
  2328. #else
  2329. #define NewGXFilterPanelEventProc(userRoutine)        \
  2330.         ((GXFilterPanelEventUPP) (userRoutine))
  2331. #endif
  2332.  
  2333. #if GENERATINGCFM
  2334. #define CallGXFilterPanelEventProc(userRoutine, pHitInfo, returnImmed)        \
  2335.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFilterPanelEventProcInfo, (pHitInfo), (returnImmed))
  2336. #else
  2337. #define CallGXFilterPanelEventProc(userRoutine, pHitInfo, returnImmed)        \
  2338.         (*(userRoutine))((pHitInfo), (returnImmed))
  2339. #endif
  2340. #define Send_GXFilterPanelEvent(pHitInfo, returnImmed) \
  2341.           SendMessage(0x00000008, pHitInfo, returnImmed)
  2342. typedef OSErr (*GXHandlePanelEventProcPtr)(gxPanelInfoRecord *pHitInfo, gxPanelResult *panelResponse);
  2343.  
  2344. #if GENERATINGCFM
  2345. typedef UniversalProcPtr GXHandlePanelEventUPP;
  2346. #else
  2347. typedef GXHandlePanelEventProcPtr GXHandlePanelEventUPP;
  2348. #endif
  2349.  
  2350. enum {
  2351.     uppGXHandlePanelEventProcInfo = kCStackBased
  2352.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2353.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPanelInfoRecord *)))
  2354.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxPanelResult *)))
  2355. };
  2356.  
  2357. #if GENERATINGCFM
  2358. #define NewGXHandlePanelEventProc(userRoutine)        \
  2359.         (GXHandlePanelEventUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandlePanelEventProcInfo, GetCurrentArchitecture())
  2360. #else
  2361. #define NewGXHandlePanelEventProc(userRoutine)        \
  2362.         ((GXHandlePanelEventUPP) (userRoutine))
  2363. #endif
  2364.  
  2365. #if GENERATINGCFM
  2366. #define CallGXHandlePanelEventProc(userRoutine, pHitInfo, panelResponse)        \
  2367.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXHandlePanelEventProcInfo, (pHitInfo), (panelResponse))
  2368. #else
  2369. #define CallGXHandlePanelEventProc(userRoutine, pHitInfo, panelResponse)        \
  2370.         (*(userRoutine))((pHitInfo), (panelResponse))
  2371. #endif
  2372. #define Send_GXHandlePanelEvent(pHitInfo, panelResponse) \
  2373.           SendMessage(0x00000009, pHitInfo, panelResponse)
  2374. typedef OSErr (*GXParsePageRangeProcPtr)(StringPtr fromString, StringPtr toString, gxParsePageRangeResult *result);
  2375.  
  2376. #if GENERATINGCFM
  2377. typedef UniversalProcPtr GXParsePageRangeUPP;
  2378. #else
  2379. typedef GXParsePageRangeProcPtr GXParsePageRangeUPP;
  2380. #endif
  2381.  
  2382. enum {
  2383.     uppGXParsePageRangeProcInfo = kCStackBased
  2384.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2385.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StringPtr)))
  2386.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(StringPtr)))
  2387.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxParsePageRangeResult *)))
  2388. };
  2389.  
  2390. #if GENERATINGCFM
  2391. #define NewGXParsePageRangeProc(userRoutine)        \
  2392.         (GXParsePageRangeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXParsePageRangeProcInfo, GetCurrentArchitecture())
  2393. #else
  2394. #define NewGXParsePageRangeProc(userRoutine)        \
  2395.         ((GXParsePageRangeUPP) (userRoutine))
  2396. #endif
  2397.  
  2398. #if GENERATINGCFM
  2399. #define CallGXParsePageRangeProc(userRoutine, fromString, toString, result)        \
  2400.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXParsePageRangeProcInfo, (fromString), (toString), (result))
  2401. #else
  2402. #define CallGXParsePageRangeProc(userRoutine, fromString, toString, result)        \
  2403.         (*(userRoutine))((fromString), (toString), (result))
  2404. #endif
  2405. #define Send_GXParsePageRange(fromString, toString, result) \
  2406.           SendMessage(0x0000000A, fromString, toString, result)
  2407.  
  2408. #define Forward_GXParsePageRange(fromString, toString, result) \
  2409.           ForwardThisMessage((void *) (fromString), (void *) (toString), (void *) (result))
  2410. typedef OSErr (*GXDefaultJobProcPtr)(void );
  2411.  
  2412. #if GENERATINGCFM
  2413. typedef UniversalProcPtr GXDefaultJobUPP;
  2414. #else
  2415. typedef GXDefaultJobProcPtr GXDefaultJobUPP;
  2416. #endif
  2417.  
  2418. enum {
  2419.     uppGXDefaultJobProcInfo = kCStackBased
  2420.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2421. };
  2422.  
  2423. #if GENERATINGCFM
  2424. #define NewGXDefaultJobProc(userRoutine)        \
  2425.         (GXDefaultJobUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultJobProcInfo, GetCurrentArchitecture())
  2426. #else
  2427. #define NewGXDefaultJobProc(userRoutine)        \
  2428.         ((GXDefaultJobUPP) (userRoutine))
  2429. #endif
  2430.  
  2431. #if GENERATINGCFM
  2432. #define CallGXDefaultJobProc(userRoutine)        \
  2433.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDefaultJobProcInfo)
  2434. #else
  2435. #define CallGXDefaultJobProc(userRoutine)        \
  2436.         (*(userRoutine))()
  2437. #endif
  2438. #define Send_GXDefaultJob() SendMessage(0x0000000B)
  2439. #define Forward_GXDefaultJob() ForwardThisMessage((void *) (0))
  2440. typedef OSErr (*GXDefaultFormatProcPtr)(gxFormat theFormat);
  2441.  
  2442. #if GENERATINGCFM
  2443. typedef UniversalProcPtr GXDefaultFormatUPP;
  2444. #else
  2445. typedef GXDefaultFormatProcPtr GXDefaultFormatUPP;
  2446. #endif
  2447.  
  2448. enum {
  2449.     uppGXDefaultFormatProcInfo = kCStackBased
  2450.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2451.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  2452. };
  2453.  
  2454. #if GENERATINGCFM
  2455. #define NewGXDefaultFormatProc(userRoutine)        \
  2456.         (GXDefaultFormatUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultFormatProcInfo, GetCurrentArchitecture())
  2457. #else
  2458. #define NewGXDefaultFormatProc(userRoutine)        \
  2459.         ((GXDefaultFormatUPP) (userRoutine))
  2460. #endif
  2461.  
  2462. #if GENERATINGCFM
  2463. #define CallGXDefaultFormatProc(userRoutine, theFormat)        \
  2464.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDefaultFormatProcInfo, (theFormat))
  2465. #else
  2466. #define CallGXDefaultFormatProc(userRoutine, theFormat)        \
  2467.         (*(userRoutine))((theFormat))
  2468. #endif
  2469. #define Send_GXDefaultFormat(theFormat) \
  2470.           SendMessage(0x0000000C, theFormat)
  2471.  
  2472. #define Forward_GXDefaultFormat(theFormat) \
  2473.           ForwardThisMessage((void *) (theFormat))
  2474. typedef OSErr (*GXDefaultPaperTypeProcPtr)(gxPaperType thePaperType);
  2475.  
  2476. #if GENERATINGCFM
  2477. typedef UniversalProcPtr GXDefaultPaperTypeUPP;
  2478. #else
  2479. typedef GXDefaultPaperTypeProcPtr GXDefaultPaperTypeUPP;
  2480. #endif
  2481.  
  2482. enum {
  2483.     uppGXDefaultPaperTypeProcInfo = kCStackBased
  2484.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2485.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPaperType)))
  2486. };
  2487.  
  2488. #if GENERATINGCFM
  2489. #define NewGXDefaultPaperTypeProc(userRoutine)        \
  2490.         (GXDefaultPaperTypeUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPaperTypeProcInfo, GetCurrentArchitecture())
  2491. #else
  2492. #define NewGXDefaultPaperTypeProc(userRoutine)        \
  2493.         ((GXDefaultPaperTypeUPP) (userRoutine))
  2494. #endif
  2495.  
  2496. #if GENERATINGCFM
  2497. #define CallGXDefaultPaperTypeProc(userRoutine, thePaperType)        \
  2498.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDefaultPaperTypeProcInfo, (thePaperType))
  2499. #else
  2500. #define CallGXDefaultPaperTypeProc(userRoutine, thePaperType)        \
  2501.         (*(userRoutine))((thePaperType))
  2502. #endif
  2503. #define Send_GXDefaultPaperType(thePaperType) \
  2504.           SendMessage(0x0000000D, thePaperType)
  2505.  
  2506. #define Forward_GXDefaultPaperType(thePaperType) \
  2507.           ForwardThisMessage((void *) thePaperType)
  2508. typedef OSErr (*GXDefaultPrinterProcPtr)(gxPrinter thePrinter);
  2509.  
  2510. #if GENERATINGCFM
  2511. typedef UniversalProcPtr GXDefaultPrinterUPP;
  2512. #else
  2513. typedef GXDefaultPrinterProcPtr GXDefaultPrinterUPP;
  2514. #endif
  2515.  
  2516. enum {
  2517.     uppGXDefaultPrinterProcInfo = kCStackBased
  2518.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2519.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPrinter)))
  2520. };
  2521.  
  2522. #if GENERATINGCFM
  2523. #define NewGXDefaultPrinterProc(userRoutine)        \
  2524.         (GXDefaultPrinterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultPrinterProcInfo, GetCurrentArchitecture())
  2525. #else
  2526. #define NewGXDefaultPrinterProc(userRoutine)        \
  2527.         ((GXDefaultPrinterUPP) (userRoutine))
  2528. #endif
  2529.  
  2530. #if GENERATINGCFM
  2531. #define CallGXDefaultPrinterProc(userRoutine, thePrinter)        \
  2532.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDefaultPrinterProcInfo, (thePrinter))
  2533. #else
  2534. #define CallGXDefaultPrinterProc(userRoutine, thePrinter)        \
  2535.         (*(userRoutine))((thePrinter))
  2536. #endif
  2537. #define Send_GXDefaultPrinter(thePrinter) \
  2538.           SendMessage(0x0000000E, thePrinter)
  2539.  
  2540. #define Forward_GXDefaultPrinter(thePrinter) \
  2541.           ForwardThisMessage((void *) thePrinter)
  2542. typedef OSErr (*GXCreateSpoolFileProcPtr)(FSSpecPtr pFileSpec, long createOptions, gxSpoolFile *theSpoolFile);
  2543.  
  2544. #if GENERATINGCFM
  2545. typedef UniversalProcPtr GXCreateSpoolFileUPP;
  2546. #else
  2547. typedef GXCreateSpoolFileProcPtr GXCreateSpoolFileUPP;
  2548. #endif
  2549.  
  2550. enum {
  2551.     uppGXCreateSpoolFileProcInfo = kCStackBased
  2552.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2553.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(FSSpecPtr)))
  2554.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  2555.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxSpoolFile *)))
  2556. };
  2557.  
  2558. #if GENERATINGCFM
  2559. #define NewGXCreateSpoolFileProc(userRoutine)        \
  2560.         (GXCreateSpoolFileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateSpoolFileProcInfo, GetCurrentArchitecture())
  2561. #else
  2562. #define NewGXCreateSpoolFileProc(userRoutine)        \
  2563.         ((GXCreateSpoolFileUPP) (userRoutine))
  2564. #endif
  2565.  
  2566. #if GENERATINGCFM
  2567. #define CallGXCreateSpoolFileProc(userRoutine, pFileSpec, createOptions, theSpoolFile)        \
  2568.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCreateSpoolFileProcInfo, (pFileSpec), (createOptions), (theSpoolFile))
  2569. #else
  2570. #define CallGXCreateSpoolFileProc(userRoutine, pFileSpec, createOptions, theSpoolFile)        \
  2571.         (*(userRoutine))((pFileSpec), (createOptions), (theSpoolFile))
  2572. #endif
  2573. #define Send_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2574.           SendMessage(0x0000000F, pFileSpec, createOptions, \
  2575.                             theSpoolFile)
  2576.  
  2577. #define Forward_GXCreateSpoolFile(pFileSpec, createOptions, theSpoolFile) \
  2578.           ForwardThisMessage((void *) pFileSpec, (void *) (createOptions), (void *) theSpoolFile)
  2579. typedef OSErr (*GXSpoolPageProcPtr)(gxSpoolFile theSpoolFile, gxFormat theFormat, gxShape thePage);
  2580.  
  2581. #if GENERATINGCFM
  2582. typedef UniversalProcPtr GXSpoolPageUPP;
  2583. #else
  2584. typedef GXSpoolPageProcPtr GXSpoolPageUPP;
  2585. #endif
  2586.  
  2587. enum {
  2588.     uppGXSpoolPageProcInfo = kCStackBased
  2589.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2590.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2591.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxFormat)))
  2592.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxShape)))
  2593. };
  2594.  
  2595. #if GENERATINGCFM
  2596. #define NewGXSpoolPageProc(userRoutine)        \
  2597.         (GXSpoolPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolPageProcInfo, GetCurrentArchitecture())
  2598. #else
  2599. #define NewGXSpoolPageProc(userRoutine)        \
  2600.         ((GXSpoolPageUPP) (userRoutine))
  2601. #endif
  2602.  
  2603. #if GENERATINGCFM
  2604. #define CallGXSpoolPageProc(userRoutine, theSpoolFile, theFormat, thePage)        \
  2605.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSpoolPageProcInfo, (theSpoolFile), (theFormat), (thePage))
  2606. #else
  2607. #define CallGXSpoolPageProc(userRoutine, theSpoolFile, theFormat, thePage)        \
  2608.         (*(userRoutine))((theSpoolFile), (theFormat), (thePage))
  2609. #endif
  2610. #define Send_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2611.           SendMessage(0x00000010, theSpoolFile, theFormat, thePage)
  2612.  
  2613. #define Forward_GXSpoolPage(theSpoolFile, theFormat, thePage) \
  2614.           ForwardThisMessage((void *) theSpoolFile, (void *) theFormat, (void *) thePage)
  2615. typedef OSErr (*GXSpoolDataProcPtr)(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2616.  
  2617. #if GENERATINGCFM
  2618. typedef UniversalProcPtr GXSpoolDataUPP;
  2619. #else
  2620. typedef GXSpoolDataProcPtr GXSpoolDataUPP;
  2621. #endif
  2622.  
  2623. enum {
  2624.     uppGXSpoolDataProcInfo = kCStackBased
  2625.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2626.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2627.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  2628.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long *)))
  2629. };
  2630.  
  2631. #if GENERATINGCFM
  2632. #define NewGXSpoolDataProc(userRoutine)        \
  2633.         (GXSpoolDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolDataProcInfo, GetCurrentArchitecture())
  2634. #else
  2635. #define NewGXSpoolDataProc(userRoutine)        \
  2636.         ((GXSpoolDataUPP) (userRoutine))
  2637. #endif
  2638.  
  2639. #if GENERATINGCFM
  2640. #define CallGXSpoolDataProc(userRoutine, theSpoolFile, data, length)        \
  2641.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSpoolDataProcInfo, (theSpoolFile), (data), (length))
  2642. #else
  2643. #define CallGXSpoolDataProc(userRoutine, theSpoolFile, data, length)        \
  2644.         (*(userRoutine))((theSpoolFile), (data), (length))
  2645. #endif
  2646. #define Send_GXSpoolData(theSpoolFile, data, length) \
  2647.           SendMessage(0x00000011, theSpoolFile, data, length)
  2648.  
  2649. #define Forward_GXSpoolData(theSpoolFile, data, length) \
  2650.           ForwardThisMessage((void *) theSpoolFile, (void *) data, (void *) length)
  2651. typedef OSErr (*GXSpoolResourceProcPtr)(gxSpoolFile theSpoolFile, Handle theResource, ResType theType, long id);
  2652.  
  2653. #if GENERATINGCFM
  2654. typedef UniversalProcPtr GXSpoolResourceUPP;
  2655. #else
  2656. typedef GXSpoolResourceProcPtr GXSpoolResourceUPP;
  2657. #endif
  2658.  
  2659. enum {
  2660.     uppGXSpoolResourceProcInfo = kCStackBased
  2661.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2662.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2663.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Handle)))
  2664.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(ResType)))
  2665.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
  2666. };
  2667.  
  2668. #if GENERATINGCFM
  2669. #define NewGXSpoolResourceProc(userRoutine)        \
  2670.         (GXSpoolResourceUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSpoolResourceProcInfo, GetCurrentArchitecture())
  2671. #else
  2672. #define NewGXSpoolResourceProc(userRoutine)        \
  2673.         ((GXSpoolResourceUPP) (userRoutine))
  2674. #endif
  2675.  
  2676. #if GENERATINGCFM
  2677. #define CallGXSpoolResourceProc(userRoutine, theSpoolFile, theResource, theType, id)        \
  2678.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSpoolResourceProcInfo, (theSpoolFile), (theResource), (theType), (id))
  2679. #else
  2680. #define CallGXSpoolResourceProc(userRoutine, theSpoolFile, theResource, theType, id)        \
  2681.         (*(userRoutine))((theSpoolFile), (theResource), (theType), (id))
  2682. #endif
  2683. #define Send_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2684.           SendMessage(0x00000012, theSpoolFile, theResource, \
  2685.                             theType, id)
  2686.  
  2687. #define Forward_GXSpoolResource(theSpoolFile, theResource, theType, id) \
  2688.           ForwardThisMessage((void *) theSpoolFile, (void *) theResource, \
  2689.                                       (void *) theType, (void *) (id))
  2690. typedef OSErr (*GXCompleteSpoolFileProcPtr)(gxSpoolFile theSpoolFile);
  2691.  
  2692. #if GENERATINGCFM
  2693. typedef UniversalProcPtr GXCompleteSpoolFileUPP;
  2694. #else
  2695. typedef GXCompleteSpoolFileProcPtr GXCompleteSpoolFileUPP;
  2696. #endif
  2697.  
  2698. enum {
  2699.     uppGXCompleteSpoolFileProcInfo = kCStackBased
  2700.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2701.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2702. };
  2703.  
  2704. #if GENERATINGCFM
  2705. #define NewGXCompleteSpoolFileProc(userRoutine)        \
  2706.         (GXCompleteSpoolFileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCompleteSpoolFileProcInfo, GetCurrentArchitecture())
  2707. #else
  2708. #define NewGXCompleteSpoolFileProc(userRoutine)        \
  2709.         ((GXCompleteSpoolFileUPP) (userRoutine))
  2710. #endif
  2711.  
  2712. #if GENERATINGCFM
  2713. #define CallGXCompleteSpoolFileProc(userRoutine, theSpoolFile)        \
  2714.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCompleteSpoolFileProcInfo, (theSpoolFile))
  2715. #else
  2716. #define CallGXCompleteSpoolFileProc(userRoutine, theSpoolFile)        \
  2717.         (*(userRoutine))((theSpoolFile))
  2718. #endif
  2719. #define Send_GXCompleteSpoolFile(theSpoolFile) \
  2720.           SendMessage(0x00000013, theSpoolFile)
  2721.  
  2722. #define Forward_GXCompleteSpoolFile(theSpoolFile) \
  2723.           ForwardThisMessage((void *) (theSpoolFile))
  2724. typedef OSErr (*GXCountPagesProcPtr)(gxSpoolFile theSpoolFile, long *numPages);
  2725.  
  2726. #if GENERATINGCFM
  2727. typedef UniversalProcPtr GXCountPagesUPP;
  2728. #else
  2729. typedef GXCountPagesProcPtr GXCountPagesUPP;
  2730. #endif
  2731.  
  2732. enum {
  2733.     uppGXCountPagesProcInfo = kCStackBased
  2734.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2735.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2736.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long *)))
  2737. };
  2738.  
  2739. #if GENERATINGCFM
  2740. #define NewGXCountPagesProc(userRoutine)        \
  2741.         (GXCountPagesUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCountPagesProcInfo, GetCurrentArchitecture())
  2742. #else
  2743. #define NewGXCountPagesProc(userRoutine)        \
  2744.         ((GXCountPagesUPP) (userRoutine))
  2745. #endif
  2746.  
  2747. #if GENERATINGCFM
  2748. #define CallGXCountPagesProc(userRoutine, theSpoolFile, numPages)        \
  2749.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCountPagesProcInfo, (theSpoolFile), (numPages))
  2750. #else
  2751. #define CallGXCountPagesProc(userRoutine, theSpoolFile, numPages)        \
  2752.         (*(userRoutine))((theSpoolFile), (numPages))
  2753. #endif
  2754. #define Send_GXCountPages(theSpoolFile, numPages) \
  2755.           SendMessage(0x00000014, theSpoolFile, numPages)
  2756.  
  2757. #define Forward_GXCountPages(theSpoolFile, numPages) \
  2758.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages))
  2759. typedef OSErr (*GXDespoolPageProcPtr)(gxSpoolFile theSpoolFile, long numPages, gxFormat theFormat, gxShape *thePage, Boolean *formatChanged);
  2760.  
  2761. #if GENERATINGCFM
  2762. typedef UniversalProcPtr GXDespoolPageUPP;
  2763. #else
  2764. typedef GXDespoolPageProcPtr GXDespoolPageUPP;
  2765. #endif
  2766.  
  2767. enum {
  2768.     uppGXDespoolPageProcInfo = kCStackBased
  2769.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2770.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2771.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  2772.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxFormat)))
  2773.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(gxShape *)))
  2774.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Boolean *)))
  2775. };
  2776.  
  2777. #if GENERATINGCFM
  2778. #define NewGXDespoolPageProc(userRoutine)        \
  2779.         (GXDespoolPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolPageProcInfo, GetCurrentArchitecture())
  2780. #else
  2781. #define NewGXDespoolPageProc(userRoutine)        \
  2782.         ((GXDespoolPageUPP) (userRoutine))
  2783. #endif
  2784.  
  2785. #if GENERATINGCFM
  2786. #define CallGXDespoolPageProc(userRoutine, theSpoolFile, numPages, theFormat, thePage, formatChanged)        \
  2787.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDespoolPageProcInfo, (theSpoolFile), (numPages), (theFormat), (thePage), (formatChanged))
  2788. #else
  2789. #define CallGXDespoolPageProc(userRoutine, theSpoolFile, numPages, theFormat, thePage, formatChanged)        \
  2790.         (*(userRoutine))((theSpoolFile), (numPages), (theFormat), (thePage), (formatChanged))
  2791. #endif
  2792. #define Send_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2793.           SendMessage(0x00000015, theSpoolFile, numPages, \
  2794.                             theFormat, thePage, formatChanged)
  2795.  
  2796. #define Forward_GXDespoolPage(theSpoolFile, numPages, theFormat, thePage, formatChanged) \
  2797.           ForwardThisMessage((void *) (theSpoolFile), (void *) (numPages), (void *) (theFormat), \
  2798.                                       (void *) (thePage), (void *) (formatChanged))
  2799. typedef OSErr (*GXDespoolDataProcPtr)(gxSpoolFile theSpoolFile, Ptr data, long *length);
  2800.  
  2801. #if GENERATINGCFM
  2802. typedef UniversalProcPtr GXDespoolDataUPP;
  2803. #else
  2804. typedef GXDespoolDataProcPtr GXDespoolDataUPP;
  2805. #endif
  2806.  
  2807. enum {
  2808.     uppGXDespoolDataProcInfo = kCStackBased
  2809.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2810.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2811.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
  2812.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long *)))
  2813. };
  2814.  
  2815. #if GENERATINGCFM
  2816. #define NewGXDespoolDataProc(userRoutine)        \
  2817.         (GXDespoolDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolDataProcInfo, GetCurrentArchitecture())
  2818. #else
  2819. #define NewGXDespoolDataProc(userRoutine)        \
  2820.         ((GXDespoolDataUPP) (userRoutine))
  2821. #endif
  2822.  
  2823. #if GENERATINGCFM
  2824. #define CallGXDespoolDataProc(userRoutine, theSpoolFile, data, length)        \
  2825.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDespoolDataProcInfo, (theSpoolFile), (data), (length))
  2826. #else
  2827. #define CallGXDespoolDataProc(userRoutine, theSpoolFile, data, length)        \
  2828.         (*(userRoutine))((theSpoolFile), (data), (length))
  2829. #endif
  2830. #define Send_GXDespoolData(theSpoolFile, data, length) \
  2831.           SendMessage(0x00000016, theSpoolFile, data, length)
  2832.  
  2833. #define Forward_GXDespoolData(theSpoolFile, data, length) \
  2834.           ForwardThisMessage((void *) (theSpoolFile), (void *) (data), (void *) (length))
  2835. typedef OSErr (*GXDespoolResourceProcPtr)(gxSpoolFile theSpoolFile, ResType theType, long id, Handle *theResource);
  2836.  
  2837. #if GENERATINGCFM
  2838. typedef UniversalProcPtr GXDespoolResourceUPP;
  2839. #else
  2840. typedef GXDespoolResourceProcPtr GXDespoolResourceUPP;
  2841. #endif
  2842.  
  2843. enum {
  2844.     uppGXDespoolResourceProcInfo = kCStackBased
  2845.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2846.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2847.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(ResType)))
  2848.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  2849.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Handle *)))
  2850. };
  2851.  
  2852. #if GENERATINGCFM
  2853. #define NewGXDespoolResourceProc(userRoutine)        \
  2854.         (GXDespoolResourceUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDespoolResourceProcInfo, GetCurrentArchitecture())
  2855. #else
  2856. #define NewGXDespoolResourceProc(userRoutine)        \
  2857.         ((GXDespoolResourceUPP) (userRoutine))
  2858. #endif
  2859.  
  2860. #if GENERATINGCFM
  2861. #define CallGXDespoolResourceProc(userRoutine, theSpoolFile, theType, id, theResource)        \
  2862.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDespoolResourceProcInfo, (theSpoolFile), (theType), (id), (theResource))
  2863. #else
  2864. #define CallGXDespoolResourceProc(userRoutine, theSpoolFile, theType, id, theResource)        \
  2865.         (*(userRoutine))((theSpoolFile), (theType), (id), (theResource))
  2866. #endif
  2867. #define Send_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2868.           SendMessage(0x00000017, theSpoolFile, theType, \
  2869.                             id, theResource)
  2870.  
  2871. #define Forward_GXDespoolResource(theSpoolFile, theType, id, theResource) \
  2872.           ForwardThisMessage((void *) (theSpoolFile), (void *) (theType), (void *) (id), \
  2873.                                       (void *) (theResource))
  2874. typedef OSErr (*GXCloseSpoolFileProcPtr)(gxSpoolFile theSpoolFile, long closeOptions);
  2875.  
  2876. #if GENERATINGCFM
  2877. typedef UniversalProcPtr GXCloseSpoolFileUPP;
  2878. #else
  2879. typedef GXCloseSpoolFileProcPtr GXCloseSpoolFileUPP;
  2880. #endif
  2881.  
  2882. enum {
  2883.     uppGXCloseSpoolFileProcInfo = kCStackBased
  2884.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2885.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  2886.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  2887. };
  2888.  
  2889. #if GENERATINGCFM
  2890. #define NewGXCloseSpoolFileProc(userRoutine)        \
  2891.         (GXCloseSpoolFileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseSpoolFileProcInfo, GetCurrentArchitecture())
  2892. #else
  2893. #define NewGXCloseSpoolFileProc(userRoutine)        \
  2894.         ((GXCloseSpoolFileUPP) (userRoutine))
  2895. #endif
  2896.  
  2897. #if GENERATINGCFM
  2898. #define CallGXCloseSpoolFileProc(userRoutine, theSpoolFile, closeOptions)        \
  2899.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCloseSpoolFileProcInfo, (theSpoolFile), (closeOptions))
  2900. #else
  2901. #define CallGXCloseSpoolFileProc(userRoutine, theSpoolFile, closeOptions)        \
  2902.         (*(userRoutine))((theSpoolFile), (closeOptions))
  2903. #endif
  2904. #define Send_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2905.           SendMessage(0x00000018, theSpoolFile, closeOptions)
  2906.  
  2907. #define Forward_GXCloseSpoolFile(theSpoolFile, closeOptions) \
  2908.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  2909. typedef OSErr (*GXStartJobProcPtr)(StringPtr docName, long pageCount);
  2910.  
  2911. #if GENERATINGCFM
  2912. typedef UniversalProcPtr GXStartJobUPP;
  2913. #else
  2914. typedef GXStartJobProcPtr GXStartJobUPP;
  2915. #endif
  2916.  
  2917. enum {
  2918.     uppGXStartJobProcInfo = kCStackBased
  2919.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2920.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StringPtr)))
  2921.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  2922. };
  2923.  
  2924. #if GENERATINGCFM
  2925. #define NewGXStartJobProc(userRoutine)        \
  2926.         (GXStartJobUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartJobProcInfo, GetCurrentArchitecture())
  2927. #else
  2928. #define NewGXStartJobProc(userRoutine)        \
  2929.         ((GXStartJobUPP) (userRoutine))
  2930. #endif
  2931.  
  2932. #if GENERATINGCFM
  2933. #define CallGXStartJobProc(userRoutine, docName, pageCount)        \
  2934.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXStartJobProcInfo, (docName), (pageCount))
  2935. #else
  2936. #define CallGXStartJobProc(userRoutine, docName, pageCount)        \
  2937.         (*(userRoutine))((docName), (pageCount))
  2938. #endif
  2939. #define Send_GXStartJob(docName, pageCount) \
  2940.           SendMessage(0x00000019, docName, pageCount)
  2941.  
  2942. #define Forward_GXStartJob(docName, pageCount) \
  2943.           ForwardThisMessage((void *) (docName), (void *) (pageCount))
  2944. typedef OSErr (*GXFinishJobProcPtr)(void );
  2945.  
  2946. #if GENERATINGCFM
  2947. typedef UniversalProcPtr GXFinishJobUPP;
  2948. #else
  2949. typedef GXFinishJobProcPtr GXFinishJobUPP;
  2950. #endif
  2951.  
  2952. enum {
  2953.     uppGXFinishJobProcInfo = kCStackBased
  2954.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2955. };
  2956.  
  2957. #if GENERATINGCFM
  2958. #define NewGXFinishJobProc(userRoutine)        \
  2959.         (GXFinishJobUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishJobProcInfo, GetCurrentArchitecture())
  2960. #else
  2961. #define NewGXFinishJobProc(userRoutine)        \
  2962.         ((GXFinishJobUPP) (userRoutine))
  2963. #endif
  2964.  
  2965. #if GENERATINGCFM
  2966. #define CallGXFinishJobProc(userRoutine)        \
  2967.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFinishJobProcInfo)
  2968. #else
  2969. #define CallGXFinishJobProc(userRoutine)        \
  2970.         (*(userRoutine))()
  2971. #endif
  2972. #define Send_GXFinishJob() SendMessage(0x0000001A)
  2973. #define Forward_GXFinishJob() ForwardThisMessage((void *) (0))
  2974. typedef OSErr (*GXStartPageProcPtr)(gxFormat theFormat, long numViewPorts, gxViewPort *viewPortList);
  2975.  
  2976. #if GENERATINGCFM
  2977. typedef UniversalProcPtr GXStartPageUPP;
  2978. #else
  2979. typedef GXStartPageProcPtr GXStartPageUPP;
  2980. #endif
  2981.  
  2982. enum {
  2983.     uppGXStartPageProcInfo = kCStackBased
  2984.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  2985.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  2986.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  2987.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxViewPort *)))
  2988. };
  2989.  
  2990. #if GENERATINGCFM
  2991. #define NewGXStartPageProc(userRoutine)        \
  2992.         (GXStartPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartPageProcInfo, GetCurrentArchitecture())
  2993. #else
  2994. #define NewGXStartPageProc(userRoutine)        \
  2995.         ((GXStartPageUPP) (userRoutine))
  2996. #endif
  2997.  
  2998. #if GENERATINGCFM
  2999. #define CallGXStartPageProc(userRoutine, theFormat, numViewPorts, viewPortList)        \
  3000.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXStartPageProcInfo, (theFormat), (numViewPorts), (viewPortList))
  3001. #else
  3002. #define CallGXStartPageProc(userRoutine, theFormat, numViewPorts, viewPortList)        \
  3003.         (*(userRoutine))((theFormat), (numViewPorts), (viewPortList))
  3004. #endif
  3005. #define Send_GXStartPage(theFormat, numViewPorts, viewPortList) \
  3006.           SendMessage(0x0000001B, theFormat, numViewPorts, viewPortList)
  3007.  
  3008. #define Forward_GXStartPage(theFormat, numViewPorts, viewPortList) \
  3009.           ForwardThisMessage((void *) (theFormat), (void *) (numViewPorts), (void *) (viewPortList))
  3010. typedef OSErr (*GXFinishPageProcPtr)(void );
  3011.  
  3012. #if GENERATINGCFM
  3013. typedef UniversalProcPtr GXFinishPageUPP;
  3014. #else
  3015. typedef GXFinishPageProcPtr GXFinishPageUPP;
  3016. #endif
  3017.  
  3018. enum {
  3019.     uppGXFinishPageProcInfo = kCStackBased
  3020.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3021. };
  3022.  
  3023. #if GENERATINGCFM
  3024. #define NewGXFinishPageProc(userRoutine)        \
  3025.         (GXFinishPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishPageProcInfo, GetCurrentArchitecture())
  3026. #else
  3027. #define NewGXFinishPageProc(userRoutine)        \
  3028.         ((GXFinishPageUPP) (userRoutine))
  3029. #endif
  3030.  
  3031. #if GENERATINGCFM
  3032. #define CallGXFinishPageProc(userRoutine)        \
  3033.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFinishPageProcInfo)
  3034. #else
  3035. #define CallGXFinishPageProc(userRoutine)        \
  3036.         (*(userRoutine))()
  3037. #endif
  3038. #define Send_GXFinishPage() SendMessage(0x0000001C)
  3039. #define Forward_GXFinishPage() ForwardThisMessage((void *) (0))
  3040. typedef OSErr (*GXPrintPageProcPtr)(gxFormat theFormat, gxShape thePage);
  3041.  
  3042. #if GENERATINGCFM
  3043. typedef UniversalProcPtr GXPrintPageUPP;
  3044. #else
  3045. typedef GXPrintPageProcPtr GXPrintPageUPP;
  3046. #endif
  3047.  
  3048. enum {
  3049.     uppGXPrintPageProcInfo = kCStackBased
  3050.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3051.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  3052.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxShape)))
  3053. };
  3054.  
  3055. #if GENERATINGCFM
  3056. #define NewGXPrintPageProc(userRoutine)        \
  3057.         (GXPrintPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXPrintPageProcInfo, GetCurrentArchitecture())
  3058. #else
  3059. #define NewGXPrintPageProc(userRoutine)        \
  3060.         ((GXPrintPageUPP) (userRoutine))
  3061. #endif
  3062.  
  3063. #if GENERATINGCFM
  3064. #define CallGXPrintPageProc(userRoutine, theFormat, thePage)        \
  3065.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXPrintPageProcInfo, (theFormat), (thePage))
  3066. #else
  3067. #define CallGXPrintPageProc(userRoutine, theFormat, thePage)        \
  3068.         (*(userRoutine))((theFormat), (thePage))
  3069. #endif
  3070. #define Send_GXPrintPage(theFormat, thePage) \
  3071.           SendMessage(0x0000001D, theFormat, thePage)
  3072.  
  3073. #define Forward_GXPrintPage(theFormat, thePage) \
  3074.           ForwardThisMessage((void *) (theFormat), (void *) (thePage))
  3075. typedef OSErr (*GXSetupImageDataProcPtr)(void *imageData);
  3076.  
  3077. #if GENERATINGCFM
  3078. typedef UniversalProcPtr GXSetupImageDataUPP;
  3079. #else
  3080. typedef GXSetupImageDataProcPtr GXSetupImageDataUPP;
  3081. #endif
  3082.  
  3083. enum {
  3084.     uppGXSetupImageDataProcInfo = kCStackBased
  3085.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3086.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(void *)))
  3087. };
  3088.  
  3089. #if GENERATINGCFM
  3090. #define NewGXSetupImageDataProc(userRoutine)        \
  3091.         (GXSetupImageDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupImageDataProcInfo, GetCurrentArchitecture())
  3092. #else
  3093. #define NewGXSetupImageDataProc(userRoutine)        \
  3094.         ((GXSetupImageDataUPP) (userRoutine))
  3095. #endif
  3096.  
  3097. #if GENERATINGCFM
  3098. #define CallGXSetupImageDataProc(userRoutine, imageData)        \
  3099.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSetupImageDataProcInfo, (imageData))
  3100. #else
  3101. #define CallGXSetupImageDataProc(userRoutine, imageData)        \
  3102.         (*(userRoutine))((imageData))
  3103. #endif
  3104. #define Send_GXSetupImageData(imageData) \
  3105.           SendMessage(0x0000001E, imageData)
  3106.  
  3107. #define Forward_GXSetupImageData(imageData) \
  3108.           ForwardThisMessage((void *) (imageData))
  3109. typedef OSErr (*GXImageJobProcPtr)(gxSpoolFile theSpoolFile, long *closeOptions);
  3110.  
  3111. #if GENERATINGCFM
  3112. typedef UniversalProcPtr GXImageJobUPP;
  3113. #else
  3114. typedef GXImageJobProcPtr GXImageJobUPP;
  3115. #endif
  3116.  
  3117. enum {
  3118.     uppGXImageJobProcInfo = kCStackBased
  3119.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3120.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  3121.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long *)))
  3122. };
  3123.  
  3124. #if GENERATINGCFM
  3125. #define NewGXImageJobProc(userRoutine)        \
  3126.         (GXImageJobUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageJobProcInfo, GetCurrentArchitecture())
  3127. #else
  3128. #define NewGXImageJobProc(userRoutine)        \
  3129.         ((GXImageJobUPP) (userRoutine))
  3130. #endif
  3131.  
  3132. #if GENERATINGCFM
  3133. #define CallGXImageJobProc(userRoutine, theSpoolFile, closeOptions)        \
  3134.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXImageJobProcInfo, (theSpoolFile), (closeOptions))
  3135. #else
  3136. #define CallGXImageJobProc(userRoutine, theSpoolFile, closeOptions)        \
  3137.         (*(userRoutine))((theSpoolFile), (closeOptions))
  3138. #endif
  3139. #define Send_GXImageJob(theSpoolFile, closeOptions) \
  3140.           SendMessage(0x0000001F, theSpoolFile, closeOptions)
  3141.  
  3142. #define Forward_GXImageJob(theSpoolFile, closeOptions) \
  3143.           ForwardThisMessage((void *) (theSpoolFile), (void *) (closeOptions))
  3144. typedef OSErr (*GXImageDocumentProcPtr)(gxSpoolFile theSpoolFile, void *imageData);
  3145.  
  3146. #if GENERATINGCFM
  3147. typedef UniversalProcPtr GXImageDocumentUPP;
  3148. #else
  3149. typedef GXImageDocumentProcPtr GXImageDocumentUPP;
  3150. #endif
  3151.  
  3152. enum {
  3153.     uppGXImageDocumentProcInfo = kCStackBased
  3154.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3155.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  3156.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  3157. };
  3158.  
  3159. #if GENERATINGCFM
  3160. #define NewGXImageDocumentProc(userRoutine)        \
  3161.         (GXImageDocumentUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImageDocumentProcInfo, GetCurrentArchitecture())
  3162. #else
  3163. #define NewGXImageDocumentProc(userRoutine)        \
  3164.         ((GXImageDocumentUPP) (userRoutine))
  3165. #endif
  3166.  
  3167. #if GENERATINGCFM
  3168. #define CallGXImageDocumentProc(userRoutine, theSpoolFile, imageData)        \
  3169.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXImageDocumentProcInfo, (theSpoolFile), (imageData))
  3170. #else
  3171. #define CallGXImageDocumentProc(userRoutine, theSpoolFile, imageData)        \
  3172.         (*(userRoutine))((theSpoolFile), (imageData))
  3173. #endif
  3174. #define Send_GXImageDocument(theSpoolFile, imageData) \
  3175.           SendMessage(0x00000020, theSpoolFile, imageData)
  3176.  
  3177. #define Forward_GXImageDocument(theSpoolFile, imageData) \
  3178.           ForwardThisMessage((void *) (theSpoolFile), (void *) (imageData))
  3179. typedef OSErr (*GXImagePageProcPtr)(gxSpoolFile theSpoolFile, long pageNumber, gxFormat theFormat, void *imageData);
  3180.  
  3181. #if GENERATINGCFM
  3182. typedef UniversalProcPtr GXImagePageUPP;
  3183. #else
  3184. typedef GXImagePageProcPtr GXImagePageUPP;
  3185. #endif
  3186.  
  3187. enum {
  3188.     uppGXImagePageProcInfo = kCStackBased
  3189.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3190.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  3191.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3192.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxFormat)))
  3193.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void *)))
  3194. };
  3195.  
  3196. #if GENERATINGCFM
  3197. #define NewGXImagePageProc(userRoutine)        \
  3198.         (GXImagePageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXImagePageProcInfo, GetCurrentArchitecture())
  3199. #else
  3200. #define NewGXImagePageProc(userRoutine)        \
  3201.         ((GXImagePageUPP) (userRoutine))
  3202. #endif
  3203.  
  3204. #if GENERATINGCFM
  3205. #define CallGXImagePageProc(userRoutine, theSpoolFile, pageNumber, theFormat, imageData)        \
  3206.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXImagePageProcInfo, (theSpoolFile), (pageNumber), (theFormat), (imageData))
  3207. #else
  3208. #define CallGXImagePageProc(userRoutine, theSpoolFile, pageNumber, theFormat, imageData)        \
  3209.         (*(userRoutine))((theSpoolFile), (pageNumber), (theFormat), (imageData))
  3210. #endif
  3211. #define Send_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  3212.           SendMessage(0x00000021, theSpoolFile, pageNumber, theFormat, imageData)
  3213.  
  3214. #define Forward_GXImagePage(theSpoolFile, pageNumber, theFormat, imageData) \
  3215.           ForwardThisMessage((void *) (theSpoolFile), (void *) (pageNumber), (void *) (theFormat), \
  3216.                                       (void *) (imageData))
  3217. typedef OSErr (*GXRenderPageProcPtr)(gxFormat theFormat, gxShape thePage, gxPageInfoRecord *pageInfo, void *imageData);
  3218.  
  3219. #if GENERATINGCFM
  3220. typedef UniversalProcPtr GXRenderPageUPP;
  3221. #else
  3222. typedef GXRenderPageProcPtr GXRenderPageUPP;
  3223. #endif
  3224.  
  3225. enum {
  3226.     uppGXRenderPageProcInfo = kCStackBased
  3227.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3228.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  3229.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxShape)))
  3230.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxPageInfoRecord *)))
  3231.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(void *)))
  3232. };
  3233.  
  3234. #if GENERATINGCFM
  3235. #define NewGXRenderPageProc(userRoutine)        \
  3236.         (GXRenderPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXRenderPageProcInfo, GetCurrentArchitecture())
  3237. #else
  3238. #define NewGXRenderPageProc(userRoutine)        \
  3239.         ((GXRenderPageUPP) (userRoutine))
  3240. #endif
  3241.  
  3242. #if GENERATINGCFM
  3243. #define CallGXRenderPageProc(userRoutine, theFormat, thePage, pageInfo, imageData)        \
  3244.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXRenderPageProcInfo, (theFormat), (thePage), (pageInfo), (imageData))
  3245. #else
  3246. #define CallGXRenderPageProc(userRoutine, theFormat, thePage, pageInfo, imageData)        \
  3247.         (*(userRoutine))((theFormat), (thePage), (pageInfo), (imageData))
  3248. #endif
  3249. #define Send_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  3250.           SendMessage(0x00000022, theFormat, thePage, pageInfo, imageData)
  3251.  
  3252. #define Forward_GXRenderPage(theFormat, thePage, pageInfo, imageData) \
  3253.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (pageInfo), (void *) (imageData))
  3254. typedef OSErr (*GXCreateImageFileProcPtr)(FSSpecPtr pFileSpec, long imageFileOptions, long *theImageFile);
  3255.  
  3256. #if GENERATINGCFM
  3257. typedef UniversalProcPtr GXCreateImageFileUPP;
  3258. #else
  3259. typedef GXCreateImageFileProcPtr GXCreateImageFileUPP;
  3260. #endif
  3261.  
  3262. enum {
  3263.     uppGXCreateImageFileProcInfo = kCStackBased
  3264.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3265.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(FSSpecPtr)))
  3266.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3267.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long *)))
  3268. };
  3269.  
  3270. #if GENERATINGCFM
  3271. #define NewGXCreateImageFileProc(userRoutine)        \
  3272.         (GXCreateImageFileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCreateImageFileProcInfo, GetCurrentArchitecture())
  3273. #else
  3274. #define NewGXCreateImageFileProc(userRoutine)        \
  3275.         ((GXCreateImageFileUPP) (userRoutine))
  3276. #endif
  3277.  
  3278. #if GENERATINGCFM
  3279. #define CallGXCreateImageFileProc(userRoutine, pFileSpec, imageFileOptions, theImageFile)        \
  3280.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCreateImageFileProcInfo, (pFileSpec), (imageFileOptions), (theImageFile))
  3281. #else
  3282. #define CallGXCreateImageFileProc(userRoutine, pFileSpec, imageFileOptions, theImageFile)        \
  3283.         (*(userRoutine))((pFileSpec), (imageFileOptions), (theImageFile))
  3284. #endif
  3285. #define Send_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  3286.           SendMessage(0x00000023, pFileSpec, imageFileOptions, theImageFile)
  3287.  
  3288. #define Forward_GXCreateImageFile(pFileSpec, imageFileOptions, theImageFile) \
  3289.           ForwardThisMessage((void *) (pFileSpec), (void *) (imageFileOptions), (void *) (theImageFile))
  3290. typedef OSErr (*GXOpenConnectionProcPtr)(void );
  3291.  
  3292. #if GENERATINGCFM
  3293. typedef UniversalProcPtr GXOpenConnectionUPP;
  3294. #else
  3295. typedef GXOpenConnectionProcPtr GXOpenConnectionUPP;
  3296. #endif
  3297.  
  3298. enum {
  3299.     uppGXOpenConnectionProcInfo = kCStackBased
  3300.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3301. };
  3302.  
  3303. #if GENERATINGCFM
  3304. #define NewGXOpenConnectionProc(userRoutine)        \
  3305.         (GXOpenConnectionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionProcInfo, GetCurrentArchitecture())
  3306. #else
  3307. #define NewGXOpenConnectionProc(userRoutine)        \
  3308.         ((GXOpenConnectionUPP) (userRoutine))
  3309. #endif
  3310.  
  3311. #if GENERATINGCFM
  3312. #define CallGXOpenConnectionProc(userRoutine)        \
  3313.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXOpenConnectionProcInfo)
  3314. #else
  3315. #define CallGXOpenConnectionProc(userRoutine)        \
  3316.         (*(userRoutine))()
  3317. #endif
  3318. #define Send_GXOpenConnection() SendMessage(0x00000024)
  3319. #define Forward_GXOpenConnection() ForwardThisMessage((void *) (0))
  3320. typedef OSErr (*GXCloseConnectionProcPtr)(void );
  3321.  
  3322. #if GENERATINGCFM
  3323. typedef UniversalProcPtr GXCloseConnectionUPP;
  3324. #else
  3325. typedef GXCloseConnectionProcPtr GXCloseConnectionUPP;
  3326. #endif
  3327.  
  3328. enum {
  3329.     uppGXCloseConnectionProcInfo = kCStackBased
  3330.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3331. };
  3332.  
  3333. #if GENERATINGCFM
  3334. #define NewGXCloseConnectionProc(userRoutine)        \
  3335.         (GXCloseConnectionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCloseConnectionProcInfo, GetCurrentArchitecture())
  3336. #else
  3337. #define NewGXCloseConnectionProc(userRoutine)        \
  3338.         ((GXCloseConnectionUPP) (userRoutine))
  3339. #endif
  3340.  
  3341. #if GENERATINGCFM
  3342. #define CallGXCloseConnectionProc(userRoutine)        \
  3343.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCloseConnectionProcInfo)
  3344. #else
  3345. #define CallGXCloseConnectionProc(userRoutine)        \
  3346.         (*(userRoutine))()
  3347. #endif
  3348. #define Send_GXCloseConnection() SendMessage(0x00000025)
  3349. #define Forward_GXCloseConnection() ForwardThisMessage((void *) (0))
  3350. typedef OSErr (*GXStartSendPageProcPtr)(gxFormat theFormat);
  3351.  
  3352. #if GENERATINGCFM
  3353. typedef UniversalProcPtr GXStartSendPageUPP;
  3354. #else
  3355. typedef GXStartSendPageProcPtr GXStartSendPageUPP;
  3356. #endif
  3357.  
  3358. enum {
  3359.     uppGXStartSendPageProcInfo = kCStackBased
  3360.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3361.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  3362. };
  3363.  
  3364. #if GENERATINGCFM
  3365. #define NewGXStartSendPageProc(userRoutine)        \
  3366.         (GXStartSendPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXStartSendPageProcInfo, GetCurrentArchitecture())
  3367. #else
  3368. #define NewGXStartSendPageProc(userRoutine)        \
  3369.         ((GXStartSendPageUPP) (userRoutine))
  3370. #endif
  3371.  
  3372. #if GENERATINGCFM
  3373. #define CallGXStartSendPageProc(userRoutine, theFormat)        \
  3374.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXStartSendPageProcInfo, (theFormat))
  3375. #else
  3376. #define CallGXStartSendPageProc(userRoutine, theFormat)        \
  3377.         (*(userRoutine))((theFormat))
  3378. #endif
  3379. #define Send_GXStartSendPage(theFormat) SendMessage(0x00000026, theFormat)
  3380. #define Forward_GXStartSendPage(theFormat) ForwardThisMessage((void *) (theFormat))
  3381. typedef OSErr (*GXFinishSendPageProcPtr)(void );
  3382.  
  3383. #if GENERATINGCFM
  3384. typedef UniversalProcPtr GXFinishSendPageUPP;
  3385. #else
  3386. typedef GXFinishSendPageProcPtr GXFinishSendPageUPP;
  3387. #endif
  3388.  
  3389. enum {
  3390.     uppGXFinishSendPageProcInfo = kCStackBased
  3391.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3392. };
  3393.  
  3394. #if GENERATINGCFM
  3395. #define NewGXFinishSendPageProc(userRoutine)        \
  3396.         (GXFinishSendPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPageProcInfo, GetCurrentArchitecture())
  3397. #else
  3398. #define NewGXFinishSendPageProc(userRoutine)        \
  3399.         ((GXFinishSendPageUPP) (userRoutine))
  3400. #endif
  3401.  
  3402. #if GENERATINGCFM
  3403. #define CallGXFinishSendPageProc(userRoutine)        \
  3404.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFinishSendPageProcInfo)
  3405. #else
  3406. #define CallGXFinishSendPageProc(userRoutine)        \
  3407.         (*(userRoutine))()
  3408. #endif
  3409. #define Send_GXFinishSendPage() SendMessage(0x00000027)
  3410. #define Forward_GXFinishSendPage() ForwardThisMessage((void *) (0))
  3411. typedef OSErr (*GXWriteDataProcPtr)(Ptr data, long length);
  3412.  
  3413. #if GENERATINGCFM
  3414. typedef UniversalProcPtr GXWriteDataUPP;
  3415. #else
  3416. typedef GXWriteDataProcPtr GXWriteDataUPP;
  3417. #endif
  3418.  
  3419. enum {
  3420.     uppGXWriteDataProcInfo = kCStackBased
  3421.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3422.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  3423.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3424. };
  3425.  
  3426. #if GENERATINGCFM
  3427. #define NewGXWriteDataProc(userRoutine)        \
  3428.         (GXWriteDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteDataProcInfo, GetCurrentArchitecture())
  3429. #else
  3430. #define NewGXWriteDataProc(userRoutine)        \
  3431.         ((GXWriteDataUPP) (userRoutine))
  3432. #endif
  3433.  
  3434. #if GENERATINGCFM
  3435. #define CallGXWriteDataProc(userRoutine, data, length)        \
  3436.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXWriteDataProcInfo, (data), (length))
  3437. #else
  3438. #define CallGXWriteDataProc(userRoutine, data, length)        \
  3439.         (*(userRoutine))((data), (length))
  3440. #endif
  3441. #define Send_GXWriteData(data, length) SendMessage(0x00000028, data, length)
  3442. #define Forward_GXWriteData(data, length) ForwardThisMessage((void *) (data), (void *) (length))
  3443. typedef OSErr (*GXBufferDataProcPtr)(Ptr data, long length, long bufferOptions);
  3444.  
  3445. #if GENERATINGCFM
  3446. typedef UniversalProcPtr GXBufferDataUPP;
  3447. #else
  3448. typedef GXBufferDataProcPtr GXBufferDataUPP;
  3449. #endif
  3450.  
  3451. enum {
  3452.     uppGXBufferDataProcInfo = kCStackBased
  3453.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3454.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  3455.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3456.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  3457. };
  3458.  
  3459. #if GENERATINGCFM
  3460. #define NewGXBufferDataProc(userRoutine)        \
  3461.         (GXBufferDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXBufferDataProcInfo, GetCurrentArchitecture())
  3462. #else
  3463. #define NewGXBufferDataProc(userRoutine)        \
  3464.         ((GXBufferDataUPP) (userRoutine))
  3465. #endif
  3466.  
  3467. #if GENERATINGCFM
  3468. #define CallGXBufferDataProc(userRoutine, data, length, bufferOptions)        \
  3469.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXBufferDataProcInfo, (data), (length), (bufferOptions))
  3470. #else
  3471. #define CallGXBufferDataProc(userRoutine, data, length, bufferOptions)        \
  3472.         (*(userRoutine))((data), (length), (bufferOptions))
  3473. #endif
  3474. #define Send_GXBufferData(data, length, bufferOptions) \
  3475.           SendMessage(0x00000029, data, length, bufferOptions)
  3476.  
  3477. #define Forward_GXBufferData(data, length, bufferOptions) \
  3478.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (bufferOptions))
  3479. typedef OSErr (*GXDumpBufferProcPtr)(gxPrintingBuffer *theBuffer);
  3480.  
  3481. #if GENERATINGCFM
  3482. typedef UniversalProcPtr GXDumpBufferUPP;
  3483. #else
  3484. typedef GXDumpBufferProcPtr GXDumpBufferUPP;
  3485. #endif
  3486.  
  3487. enum {
  3488.     uppGXDumpBufferProcInfo = kCStackBased
  3489.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3490.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPrintingBuffer *)))
  3491. };
  3492.  
  3493. #if GENERATINGCFM
  3494. #define NewGXDumpBufferProc(userRoutine)        \
  3495.         (GXDumpBufferUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDumpBufferProcInfo, GetCurrentArchitecture())
  3496. #else
  3497. #define NewGXDumpBufferProc(userRoutine)        \
  3498.         ((GXDumpBufferUPP) (userRoutine))
  3499. #endif
  3500.  
  3501. #if GENERATINGCFM
  3502. #define CallGXDumpBufferProc(userRoutine, theBuffer)        \
  3503.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDumpBufferProcInfo, (theBuffer))
  3504. #else
  3505. #define CallGXDumpBufferProc(userRoutine, theBuffer)        \
  3506.         (*(userRoutine))((theBuffer))
  3507. #endif
  3508. #define Send_GXDumpBuffer(theBuffer) SendMessage(0x0000002A, theBuffer)
  3509. #define Forward_GXDumpBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  3510. typedef OSErr (*GXFreeBufferProcPtr)(gxPrintingBuffer *theBuffer);
  3511.  
  3512. #if GENERATINGCFM
  3513. typedef UniversalProcPtr GXFreeBufferUPP;
  3514. #else
  3515. typedef GXFreeBufferProcPtr GXFreeBufferUPP;
  3516. #endif
  3517.  
  3518. enum {
  3519.     uppGXFreeBufferProcInfo = kCStackBased
  3520.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3521.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPrintingBuffer *)))
  3522. };
  3523.  
  3524. #if GENERATINGCFM
  3525. #define NewGXFreeBufferProc(userRoutine)        \
  3526.         (GXFreeBufferUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFreeBufferProcInfo, GetCurrentArchitecture())
  3527. #else
  3528. #define NewGXFreeBufferProc(userRoutine)        \
  3529.         ((GXFreeBufferUPP) (userRoutine))
  3530. #endif
  3531.  
  3532. #if GENERATINGCFM
  3533. #define CallGXFreeBufferProc(userRoutine, theBuffer)        \
  3534.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFreeBufferProcInfo, (theBuffer))
  3535. #else
  3536. #define CallGXFreeBufferProc(userRoutine, theBuffer)        \
  3537.         (*(userRoutine))((theBuffer))
  3538. #endif
  3539. #define Send_GXFreeBuffer(theBuffer) SendMessage(0x0000002B, theBuffer)
  3540. #define Forward_GXFreeBuffer(theBuffer) ForwardThisMessage((void *) (theBuffer))
  3541. typedef OSErr (*GXCheckStatusProcPtr)(Ptr data, long length, long statusType, gxOwnerSignature owner);
  3542.  
  3543. #if GENERATINGCFM
  3544. typedef UniversalProcPtr GXCheckStatusUPP;
  3545. #else
  3546. typedef GXCheckStatusProcPtr GXCheckStatusUPP;
  3547. #endif
  3548.  
  3549. enum {
  3550.     uppGXCheckStatusProcInfo = kCStackBased
  3551.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3552.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  3553.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3554.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  3555.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(gxOwnerSignature)))
  3556. };
  3557.  
  3558. #if GENERATINGCFM
  3559. #define NewGXCheckStatusProc(userRoutine)        \
  3560.         (GXCheckStatusUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCheckStatusProcInfo, GetCurrentArchitecture())
  3561. #else
  3562. #define NewGXCheckStatusProc(userRoutine)        \
  3563.         ((GXCheckStatusUPP) (userRoutine))
  3564. #endif
  3565.  
  3566. #if GENERATINGCFM
  3567. #define CallGXCheckStatusProc(userRoutine, data, length, statusType, owner)        \
  3568.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCheckStatusProcInfo, (data), (length), (statusType), (owner))
  3569. #else
  3570. #define CallGXCheckStatusProc(userRoutine, data, length, statusType, owner)        \
  3571.         (*(userRoutine))((data), (length), (statusType), (owner))
  3572. #endif
  3573. #define Send_GXCheckStatus(data, length, statusType, owner) \
  3574.           SendMessage(0x0000002C, data, length, statusType, owner)
  3575.  
  3576. #define Forward_GXCheckStatus(data, length, statusType, owner) \
  3577.           ForwardThisMessage((void *) (data), (void *) (length), (void *) (statusType), (void *) (owner))
  3578. typedef OSErr (*GXGetDeviceStatusProcPtr)(Ptr cmdData, long cmdSize, Ptr responseData, long *responseSize, Str255 termination);
  3579.  
  3580. #if GENERATINGCFM
  3581. typedef UniversalProcPtr GXGetDeviceStatusUPP;
  3582. #else
  3583. typedef GXGetDeviceStatusProcPtr GXGetDeviceStatusUPP;
  3584. #endif
  3585.  
  3586. enum {
  3587.     uppGXGetDeviceStatusProcInfo = kCStackBased
  3588.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3589.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
  3590.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3591.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
  3592.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long *)))
  3593.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Str255*)))
  3594. };
  3595.  
  3596. #if GENERATINGCFM
  3597. #define NewGXGetDeviceStatusProc(userRoutine)        \
  3598.         (GXGetDeviceStatusUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDeviceStatusProcInfo, GetCurrentArchitecture())
  3599. #else
  3600. #define NewGXGetDeviceStatusProc(userRoutine)        \
  3601.         ((GXGetDeviceStatusUPP) (userRoutine))
  3602. #endif
  3603.  
  3604. #if GENERATINGCFM
  3605. #define CallGXGetDeviceStatusProc(userRoutine, cmdData, cmdSize, responseData, responseSize, termination)        \
  3606.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXGetDeviceStatusProcInfo, (cmdData), (cmdSize), (responseData), (responseSize), (termination))
  3607. #else
  3608. #define CallGXGetDeviceStatusProc(userRoutine, cmdData, cmdSize, responseData, responseSize, termination)        \
  3609.         (*(userRoutine))((cmdData), (cmdSize), (responseData), (responseSize), (termination))
  3610. #endif
  3611. #define Send_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  3612.           SendMessage(0x0000002D, cmdData, cmdSize, responseData, responseSize, termination)
  3613.  
  3614. #define Forward_GXGetDeviceStatus(cmdData, cmdSize, responseData, responseSize, termination) \
  3615.           ForwardThisMessage((void *) (cmdData), (void *) (cmdSize), (void *) (responseData), \
  3616.                                       (void *) (responseSize), (void *) (termination))
  3617. typedef OSErr (*GXFetchTaggedDataProcPtr)(ResType theType, long id, Handle *dataHdl, gxOwnerSignature owner);
  3618.  
  3619. #if GENERATINGCFM
  3620. typedef UniversalProcPtr GXFetchTaggedDataUPP;
  3621. #else
  3622. typedef GXFetchTaggedDataProcPtr GXFetchTaggedDataUPP;
  3623. #endif
  3624.  
  3625. enum {
  3626.     uppGXFetchTaggedDataProcInfo = kCStackBased
  3627.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3628.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ResType)))
  3629.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  3630.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Handle *)))
  3631.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(gxOwnerSignature)))
  3632. };
  3633.  
  3634. #if GENERATINGCFM
  3635. #define NewGXFetchTaggedDataProc(userRoutine)        \
  3636.         (GXFetchTaggedDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFetchTaggedDataProcInfo, GetCurrentArchitecture())
  3637. #else
  3638. #define NewGXFetchTaggedDataProc(userRoutine)        \
  3639.         ((GXFetchTaggedDataUPP) (userRoutine))
  3640. #endif
  3641.  
  3642. #if GENERATINGCFM
  3643. #define CallGXFetchTaggedDataProc(userRoutine, theType, id, dataHdl, owner)        \
  3644.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFetchTaggedDataProcInfo, (theType), (id), (dataHdl), (owner))
  3645. #else
  3646. #define CallGXFetchTaggedDataProc(userRoutine, theType, id, dataHdl, owner)        \
  3647.         (*(userRoutine))((theType), (id), (dataHdl), (owner))
  3648. #endif
  3649. #define Send_GXFetchTaggedDriverData(tag, id, pHandle) Send_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  3650. #define Forward_GXFetchTaggedDriverData(tag, id, pHandle) Forward_GXFetchTaggedData(tag, id, pHandle, 'drvr')
  3651. #define Send_GXFetchTaggedData(theType, id, dataHdl, owner) \
  3652.           SendMessage(0x0000002E, theType, id, dataHdl, owner)
  3653.  
  3654. #define Forward_GXFetchTaggedData(theType, id, dataHdl, owner) \
  3655.           ForwardThisMessage((void *) (theType), (void *) (id), (void *) (dataHdl), (void *) (owner))
  3656. #endif
  3657. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  3658. typedef OSErr (*GXGetDTPMenuListProcPtr)(MenuHandle menuHdl);
  3659.  
  3660. #if GENERATINGCFM
  3661. typedef UniversalProcPtr GXGetDTPMenuListUPP;
  3662. #else
  3663. typedef GXGetDTPMenuListProcPtr GXGetDTPMenuListUPP;
  3664. #endif
  3665.  
  3666. enum {
  3667.     uppGXGetDTPMenuListProcInfo = kCStackBased
  3668.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3669.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(MenuHandle)))
  3670. };
  3671.  
  3672. #if GENERATINGCFM
  3673. #define NewGXGetDTPMenuListProc(userRoutine)        \
  3674.         (GXGetDTPMenuListUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXGetDTPMenuListProcInfo, GetCurrentArchitecture())
  3675. #else
  3676. #define NewGXGetDTPMenuListProc(userRoutine)        \
  3677.         ((GXGetDTPMenuListUPP) (userRoutine))
  3678. #endif
  3679.  
  3680. #if GENERATINGCFM
  3681. #define CallGXGetDTPMenuListProc(userRoutine, menuHdl)        \
  3682.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXGetDTPMenuListProcInfo, (menuHdl))
  3683. #else
  3684. #define CallGXGetDTPMenuListProc(userRoutine, menuHdl)        \
  3685.         (*(userRoutine))((menuHdl))
  3686. #endif
  3687. #define    Send_GXGetDTPMenuList(menuHdl) \
  3688.             SendMessage(0x0000002F, menuHdl)
  3689.  
  3690. #define    Forward_GXGetDTPMenuList(menuHdl) \
  3691.             ForwardThisMessage((void *) (menuHdl))
  3692. #endif
  3693. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  3694. typedef OSErr (*GXDTPMenuSelectProcPtr)(long id);
  3695.  
  3696. #if GENERATINGCFM
  3697. typedef UniversalProcPtr GXDTPMenuSelectUPP;
  3698. #else
  3699. typedef GXDTPMenuSelectProcPtr GXDTPMenuSelectUPP;
  3700. #endif
  3701.  
  3702. enum {
  3703.     uppGXDTPMenuSelectProcInfo = kCStackBased
  3704.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3705.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  3706. };
  3707.  
  3708. #if GENERATINGCFM
  3709. #define NewGXDTPMenuSelectProc(userRoutine)        \
  3710.         (GXDTPMenuSelectUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDTPMenuSelectProcInfo, GetCurrentArchitecture())
  3711. #else
  3712. #define NewGXDTPMenuSelectProc(userRoutine)        \
  3713.         ((GXDTPMenuSelectUPP) (userRoutine))
  3714. #endif
  3715.  
  3716. #if GENERATINGCFM
  3717. #define CallGXDTPMenuSelectProc(userRoutine, id)        \
  3718.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDTPMenuSelectProcInfo, (id))
  3719. #else
  3720. #define CallGXDTPMenuSelectProc(userRoutine, id)        \
  3721.         (*(userRoutine))((id))
  3722. #endif
  3723. #define    Send_GXDTPMenuSelect(id) \
  3724.             SendMessage(0x00000030, id)
  3725.  
  3726. #define    Forward_GXDTPMenuSelect(id) \
  3727.             ForwardThisMessage((void *) (id))
  3728. typedef OSErr (*GXHandleAlertFilterProcPtr)(gxJob theJob, gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *itemHit, Boolean *returnImmed);
  3729.  
  3730. #if GENERATINGCFM
  3731. typedef UniversalProcPtr GXHandleAlertFilterUPP;
  3732. #else
  3733. typedef GXHandleAlertFilterProcPtr GXHandleAlertFilterUPP;
  3734. #endif
  3735.  
  3736. enum {
  3737.     uppGXHandleAlertFilterProcInfo = kCStackBased
  3738.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3739.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxJob)))
  3740.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxStatusRecord *)))
  3741.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(DialogPtr)))
  3742.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(EventRecord *)))
  3743.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short *)))
  3744.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(Boolean *)))
  3745. };
  3746.  
  3747. #if GENERATINGCFM
  3748. #define NewGXHandleAlertFilterProc(userRoutine)        \
  3749.         (GXHandleAlertFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertFilterProcInfo, GetCurrentArchitecture())
  3750. #else
  3751. #define NewGXHandleAlertFilterProc(userRoutine)        \
  3752.         ((GXHandleAlertFilterUPP) (userRoutine))
  3753. #endif
  3754.  
  3755. #if GENERATINGCFM
  3756. #define CallGXHandleAlertFilterProc(userRoutine, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)        \
  3757.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXHandleAlertFilterProcInfo, (theJob), (pStatusRec), (pDialog), (theEvent), (itemHit), (returnImmed))
  3758. #else
  3759. #define CallGXHandleAlertFilterProc(userRoutine, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)        \
  3760.         (*(userRoutine))((theJob), (pStatusRec), (pDialog), (theEvent), (itemHit), (returnImmed))
  3761. #endif
  3762. #define    Send_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  3763.             SendMessage(0x00000031, theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed)
  3764.  
  3765. #define    Forward_GXHandleAlertFilter(theJob, pStatusRec, pDialog, theEvent, itemHit, returnImmed) \
  3766.             ForwardThisMessage((void *) (theJob), (void *) (pStatusRec), (void *) (pDialog), (void *) (theEvent), \
  3767.                                      (void *) (itemHit), (void *) (returnImmed))
  3768. typedef OSErr (*GXJobFormatModeQueryProcPtr)(gxQueryType theQuery, void *srcData, void *dstData);
  3769.  
  3770. #if GENERATINGCFM
  3771. typedef UniversalProcPtr GXJobFormatModeQueryUPP;
  3772. #else
  3773. typedef GXJobFormatModeQueryProcPtr GXJobFormatModeQueryUPP;
  3774. #endif
  3775.  
  3776. enum {
  3777.     uppGXJobFormatModeQueryProcInfo = kCStackBased
  3778.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3779.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxQueryType)))
  3780.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  3781.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))
  3782. };
  3783.  
  3784. #if GENERATINGCFM
  3785. #define NewGXJobFormatModeQueryProc(userRoutine)        \
  3786.         (GXJobFormatModeQueryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXJobFormatModeQueryProcInfo, GetCurrentArchitecture())
  3787. #else
  3788. #define NewGXJobFormatModeQueryProc(userRoutine)        \
  3789.         ((GXJobFormatModeQueryUPP) (userRoutine))
  3790. #endif
  3791.  
  3792. #if GENERATINGCFM
  3793. #define CallGXJobFormatModeQueryProc(userRoutine, theQuery, srcData, dstData)        \
  3794.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXJobFormatModeQueryProcInfo, (theQuery), (srcData), (dstData))
  3795. #else
  3796. #define CallGXJobFormatModeQueryProc(userRoutine, theQuery, srcData, dstData)        \
  3797.         (*(userRoutine))((theQuery), (srcData), (dstData))
  3798. #endif
  3799. #define Send_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  3800.           SendMessage(0x00000032, theQuery, srcData, dstData)
  3801.  
  3802. #define Forward_GXJobFormatModeQuery(theQuery, srcData, dstData) \
  3803.           ForwardThisMessage((void *) (theQuery), (void *) (srcData), (void *) (dstData))
  3804. typedef OSErr (*GXWriteStatusToDTPWindowProcPtr)(gxStatusRecord *pStatusRec, gxDisplayRecord *pDisplay);
  3805.  
  3806. #if GENERATINGCFM
  3807. typedef UniversalProcPtr GXWriteStatusToDTPWindowUPP;
  3808. #else
  3809. typedef GXWriteStatusToDTPWindowProcPtr GXWriteStatusToDTPWindowUPP;
  3810. #endif
  3811.  
  3812. enum {
  3813.     uppGXWriteStatusToDTPWindowProcInfo = kCStackBased
  3814.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3815.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStatusRecord *)))
  3816.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxDisplayRecord *)))
  3817. };
  3818.  
  3819. #if GENERATINGCFM
  3820. #define NewGXWriteStatusToDTPWindowProc(userRoutine)        \
  3821.         (GXWriteStatusToDTPWindowUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXWriteStatusToDTPWindowProcInfo, GetCurrentArchitecture())
  3822. #else
  3823. #define NewGXWriteStatusToDTPWindowProc(userRoutine)        \
  3824.         ((GXWriteStatusToDTPWindowUPP) (userRoutine))
  3825. #endif
  3826.  
  3827. #if GENERATINGCFM
  3828. #define CallGXWriteStatusToDTPWindowProc(userRoutine, pStatusRec, pDisplay)        \
  3829.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXWriteStatusToDTPWindowProcInfo, (pStatusRec), (pDisplay))
  3830. #else
  3831. #define CallGXWriteStatusToDTPWindowProc(userRoutine, pStatusRec, pDisplay)        \
  3832.         (*(userRoutine))((pStatusRec), (pDisplay))
  3833. #endif
  3834. #define Send_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  3835.           SendMessage(0x00000033, pStatusRec, pDisplay)
  3836.  
  3837. #define Forward_GXWriteStatusToDTPWindow(pStatusRec, pDisplay) \
  3838.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDisplay))
  3839. typedef OSErr (*GXInitializeStatusAlertProcPtr)(gxStatusRecord *pStatusRec, DialogPtr *pDialog);
  3840.  
  3841. #if GENERATINGCFM
  3842. typedef UniversalProcPtr GXInitializeStatusAlertUPP;
  3843. #else
  3844. typedef GXInitializeStatusAlertProcPtr GXInitializeStatusAlertUPP;
  3845. #endif
  3846.  
  3847. enum {
  3848.     uppGXInitializeStatusAlertProcInfo = kCStackBased
  3849.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3850.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStatusRecord *)))
  3851.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DialogPtr *)))
  3852. };
  3853.  
  3854. #if GENERATINGCFM
  3855. #define NewGXInitializeStatusAlertProc(userRoutine)        \
  3856.         (GXInitializeStatusAlertUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXInitializeStatusAlertProcInfo, GetCurrentArchitecture())
  3857. #else
  3858. #define NewGXInitializeStatusAlertProc(userRoutine)        \
  3859.         ((GXInitializeStatusAlertUPP) (userRoutine))
  3860. #endif
  3861.  
  3862. #if GENERATINGCFM
  3863. #define CallGXInitializeStatusAlertProc(userRoutine, pStatusRec, pDialog)        \
  3864.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXInitializeStatusAlertProcInfo, (pStatusRec), (pDialog))
  3865. #else
  3866. #define CallGXInitializeStatusAlertProc(userRoutine, pStatusRec, pDialog)        \
  3867.         (*(userRoutine))((pStatusRec), (pDialog))
  3868. #endif
  3869. #define Send_GXInitializeStatusAlert(pStatusRec, pDialog) \
  3870.           SendMessage(0x00000034, pStatusRec, pDialog)
  3871.  
  3872. #define Forward_GXInitializeStatusAlert(pStatusRec, pDialog) \
  3873.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog))
  3874. typedef OSErr (*GXHandleAlertStatusProcPtr)(gxStatusRecord *pStatusRec);
  3875.  
  3876. #if GENERATINGCFM
  3877. typedef UniversalProcPtr GXHandleAlertStatusUPP;
  3878. #else
  3879. typedef GXHandleAlertStatusProcPtr GXHandleAlertStatusUPP;
  3880. #endif
  3881.  
  3882. enum {
  3883.     uppGXHandleAlertStatusProcInfo = kCStackBased
  3884.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3885.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStatusRecord *)))
  3886. };
  3887.  
  3888. #if GENERATINGCFM
  3889. #define NewGXHandleAlertStatusProc(userRoutine)        \
  3890.         (GXHandleAlertStatusUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertStatusProcInfo, GetCurrentArchitecture())
  3891. #else
  3892. #define NewGXHandleAlertStatusProc(userRoutine)        \
  3893.         ((GXHandleAlertStatusUPP) (userRoutine))
  3894. #endif
  3895.  
  3896. #if GENERATINGCFM
  3897. #define CallGXHandleAlertStatusProc(userRoutine, pStatusRec)        \
  3898.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXHandleAlertStatusProcInfo, (pStatusRec))
  3899. #else
  3900. #define CallGXHandleAlertStatusProc(userRoutine, pStatusRec)        \
  3901.         (*(userRoutine))((pStatusRec))
  3902. #endif
  3903. #define Send_GXHandleAlertStatus(pStatusRec) \
  3904.           SendMessage(0x00000035, pStatusRec)
  3905.  
  3906. #define Forward_GXHandleAlertStatus(pStatusRec) \
  3907.           ForwardThisMessage((void *) (pStatusRec))
  3908. typedef OSErr (*GXHandleAlertEventProcPtr)(gxStatusRecord *pStatusRec, DialogPtr pDialog, EventRecord *theEvent, short *response);
  3909.  
  3910. #if GENERATINGCFM
  3911. typedef UniversalProcPtr GXHandleAlertEventUPP;
  3912. #else
  3913. typedef GXHandleAlertEventProcPtr GXHandleAlertEventUPP;
  3914. #endif
  3915.  
  3916. enum {
  3917.     uppGXHandleAlertEventProcInfo = kCStackBased
  3918.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  3919.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxStatusRecord *)))
  3920.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(DialogPtr)))
  3921.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(EventRecord *)))
  3922.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short *)))
  3923. };
  3924.  
  3925. #if GENERATINGCFM
  3926. #define NewGXHandleAlertEventProc(userRoutine)        \
  3927.         (GXHandleAlertEventUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAlertEventProcInfo, GetCurrentArchitecture())
  3928. #else
  3929. #define NewGXHandleAlertEventProc(userRoutine)        \
  3930.         ((GXHandleAlertEventUPP) (userRoutine))
  3931. #endif
  3932.  
  3933. #if GENERATINGCFM
  3934. #define CallGXHandleAlertEventProc(userRoutine, pStatusRec, pDialog, theEvent, response)        \
  3935.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXHandleAlertEventProcInfo, (pStatusRec), (pDialog), (theEvent), (response))
  3936. #else
  3937. #define CallGXHandleAlertEventProc(userRoutine, pStatusRec, pDialog, theEvent, response)        \
  3938.         (*(userRoutine))((pStatusRec), (pDialog), (theEvent), (response))
  3939. #endif
  3940. #define Send_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  3941.           SendMessage(0x00000036, pStatusRec, pDialog, theEvent, response)
  3942.  
  3943. #define Forward_GXHandleAlertEvent(pStatusRec, pDialog, theEvent, response) \
  3944.           ForwardThisMessage((void *) (pStatusRec), (void *) (pDialog), \
  3945.                                       (void *) (theEvent), (void *) (response))
  3946. typedef void (*GXCleanupStartJobProcPtr)(void );
  3947.  
  3948. #if GENERATINGCFM
  3949. typedef UniversalProcPtr GXCleanupStartJobUPP;
  3950. #else
  3951. typedef GXCleanupStartJobProcPtr GXCleanupStartJobUPP;
  3952. #endif
  3953.  
  3954. enum {
  3955.     uppGXCleanupStartJobProcInfo = kCStackBased
  3956. };
  3957.  
  3958. #if GENERATINGCFM
  3959. #define NewGXCleanupStartJobProc(userRoutine)        \
  3960.         (GXCleanupStartJobUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartJobProcInfo, GetCurrentArchitecture())
  3961. #else
  3962. #define NewGXCleanupStartJobProc(userRoutine)        \
  3963.         ((GXCleanupStartJobUPP) (userRoutine))
  3964. #endif
  3965.  
  3966. #if GENERATINGCFM
  3967. #define CallGXCleanupStartJobProc(userRoutine)        \
  3968.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCleanupStartJobProcInfo)
  3969. #else
  3970. #define CallGXCleanupStartJobProc(userRoutine)        \
  3971.         (*(userRoutine))()
  3972. #endif
  3973. #define Send_GXCleanupStartJob() ((void) SendMessage(0x00000037))
  3974. #define Forward_GXCleanupStartJob() ((void) ForwardThisMessage((void *) (0)))
  3975. typedef void (*GXCleanupStartPageProcPtr)(void );
  3976.  
  3977. #if GENERATINGCFM
  3978. typedef UniversalProcPtr GXCleanupStartPageUPP;
  3979. #else
  3980. typedef GXCleanupStartPageProcPtr GXCleanupStartPageUPP;
  3981. #endif
  3982.  
  3983. enum {
  3984.     uppGXCleanupStartPageProcInfo = kCStackBased
  3985. };
  3986.  
  3987. #if GENERATINGCFM
  3988. #define NewGXCleanupStartPageProc(userRoutine)        \
  3989.         (GXCleanupStartPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartPageProcInfo, GetCurrentArchitecture())
  3990. #else
  3991. #define NewGXCleanupStartPageProc(userRoutine)        \
  3992.         ((GXCleanupStartPageUPP) (userRoutine))
  3993. #endif
  3994.  
  3995. #if GENERATINGCFM
  3996. #define CallGXCleanupStartPageProc(userRoutine)        \
  3997.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCleanupStartPageProcInfo)
  3998. #else
  3999. #define CallGXCleanupStartPageProc(userRoutine)        \
  4000.         (*(userRoutine))()
  4001. #endif
  4002. #define Send_GXCleanupStartPage() ((void) SendMessage(0x00000038))
  4003. #define Forward_GXCleanupStartPage() ((void) ForwardThisMessage((void *) (0)))
  4004. typedef void (*GXCleanupOpenConnectionProcPtr)(void );
  4005.  
  4006. #if GENERATINGCFM
  4007. typedef UniversalProcPtr GXCleanupOpenConnectionUPP;
  4008. #else
  4009. typedef GXCleanupOpenConnectionProcPtr GXCleanupOpenConnectionUPP;
  4010. #endif
  4011.  
  4012. enum {
  4013.     uppGXCleanupOpenConnectionProcInfo = kCStackBased
  4014. };
  4015.  
  4016. #if GENERATINGCFM
  4017. #define NewGXCleanupOpenConnectionProc(userRoutine)        \
  4018.         (GXCleanupOpenConnectionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupOpenConnectionProcInfo, GetCurrentArchitecture())
  4019. #else
  4020. #define NewGXCleanupOpenConnectionProc(userRoutine)        \
  4021.         ((GXCleanupOpenConnectionUPP) (userRoutine))
  4022. #endif
  4023.  
  4024. #if GENERATINGCFM
  4025. #define CallGXCleanupOpenConnectionProc(userRoutine)        \
  4026.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCleanupOpenConnectionProcInfo)
  4027. #else
  4028. #define CallGXCleanupOpenConnectionProc(userRoutine)        \
  4029.         (*(userRoutine))()
  4030. #endif
  4031. #define Send_GXCleanupOpenConnection() ((void) SendMessage(0x00000039))
  4032. #define Forward_GXCleanupOpenConnection() ((void) ForwardThisMessage((void *) (0)))
  4033. typedef void (*GXCleanupStartSendPageProcPtr)(void );
  4034.  
  4035. #if GENERATINGCFM
  4036. typedef UniversalProcPtr GXCleanupStartSendPageUPP;
  4037. #else
  4038. typedef GXCleanupStartSendPageProcPtr GXCleanupStartSendPageUPP;
  4039. #endif
  4040.  
  4041. enum {
  4042.     uppGXCleanupStartSendPageProcInfo = kCStackBased
  4043. };
  4044.  
  4045. #if GENERATINGCFM
  4046. #define NewGXCleanupStartSendPageProc(userRoutine)        \
  4047.         (GXCleanupStartSendPageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCleanupStartSendPageProcInfo, GetCurrentArchitecture())
  4048. #else
  4049. #define NewGXCleanupStartSendPageProc(userRoutine)        \
  4050.         ((GXCleanupStartSendPageUPP) (userRoutine))
  4051. #endif
  4052.  
  4053. #if GENERATINGCFM
  4054. #define CallGXCleanupStartSendPageProc(userRoutine)        \
  4055.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCleanupStartSendPageProcInfo)
  4056. #else
  4057. #define CallGXCleanupStartSendPageProc(userRoutine)        \
  4058.         (*(userRoutine))()
  4059. #endif
  4060. #define Send_GXCleanupStartSendPage()  ((void) SendMessage(0x0000003A))
  4061. #define Forward_GXCleanupStartSendPage() ((void) ForwardThisMessage((void *) (0)))
  4062. typedef OSErr (*GXDefaultDesktopPrinterProcPtr)(Str31 dtpName);
  4063.  
  4064. #if GENERATINGCFM
  4065. typedef UniversalProcPtr GXDefaultDesktopPrinterUPP;
  4066. #else
  4067. typedef GXDefaultDesktopPrinterProcPtr GXDefaultDesktopPrinterUPP;
  4068. #endif
  4069.  
  4070. enum {
  4071.     uppGXDefaultDesktopPrinterProcInfo = kCStackBased
  4072.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4073.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Str31*)))
  4074. };
  4075.  
  4076. #if GENERATINGCFM
  4077. #define NewGXDefaultDesktopPrinterProc(userRoutine)        \
  4078.         (GXDefaultDesktopPrinterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDefaultDesktopPrinterProcInfo, GetCurrentArchitecture())
  4079. #else
  4080. #define NewGXDefaultDesktopPrinterProc(userRoutine)        \
  4081.         ((GXDefaultDesktopPrinterUPP) (userRoutine))
  4082. #endif
  4083.  
  4084. #if GENERATINGCFM
  4085. #define CallGXDefaultDesktopPrinterProc(userRoutine, dtpName)        \
  4086.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDefaultDesktopPrinterProcInfo, (dtpName))
  4087. #else
  4088. #define CallGXDefaultDesktopPrinterProc(userRoutine, dtpName)        \
  4089.         (*(userRoutine))((dtpName))
  4090. #endif
  4091. #define Send_GXDefaultDesktopPrinter(dtpName) SendMessage(0x0000003B, dtpName)
  4092. #define Forward_GXDefaultDesktopPrinter(dtpName) ForwardThisMessage((void *) (dtpName))
  4093. typedef OSErr (*GXCaptureOutputDeviceProcPtr)(Boolean capture);
  4094.  
  4095. #if GENERATINGCFM
  4096. typedef UniversalProcPtr GXCaptureOutputDeviceUPP;
  4097. #else
  4098. typedef GXCaptureOutputDeviceProcPtr GXCaptureOutputDeviceUPP;
  4099. #endif
  4100.  
  4101. enum {
  4102.     uppGXCaptureOutputDeviceProcInfo = kCStackBased
  4103.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4104.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Boolean)))
  4105. };
  4106.  
  4107. #if GENERATINGCFM
  4108. #define NewGXCaptureOutputDeviceProc(userRoutine)        \
  4109.         (GXCaptureOutputDeviceUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXCaptureOutputDeviceProcInfo, GetCurrentArchitecture())
  4110. #else
  4111. #define NewGXCaptureOutputDeviceProc(userRoutine)        \
  4112.         ((GXCaptureOutputDeviceUPP) (userRoutine))
  4113. #endif
  4114.  
  4115. #if GENERATINGCFM
  4116. #define CallGXCaptureOutputDeviceProc(userRoutine, capture)        \
  4117.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXCaptureOutputDeviceProcInfo, (capture))
  4118. #else
  4119. #define CallGXCaptureOutputDeviceProc(userRoutine, capture)        \
  4120.         (*(userRoutine))((capture))
  4121. #endif
  4122. #define Send_GXCaptureOutputDevice(capture) SendMessage(0x0000003C, capture)
  4123. #define Forward_GXCaptureOutputDevice(capture) ForwardThisMessage((void *) (capture))
  4124. typedef OSErr (*GXOpenConnectionRetryProcPtr)(ResType theType, void *aVoid, Boolean *retryopenPtr, OSErr anErr);
  4125.  
  4126. #if GENERATINGCFM
  4127. typedef UniversalProcPtr GXOpenConnectionRetryUPP;
  4128. #else
  4129. typedef GXOpenConnectionRetryProcPtr GXOpenConnectionRetryUPP;
  4130. #endif
  4131.  
  4132. enum {
  4133.     uppGXOpenConnectionRetryProcInfo = kCStackBased
  4134.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4135.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ResType)))
  4136.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  4137.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean *)))
  4138.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(OSErr)))
  4139. };
  4140.  
  4141. #if GENERATINGCFM
  4142. #define NewGXOpenConnectionRetryProc(userRoutine)        \
  4143.         (GXOpenConnectionRetryUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXOpenConnectionRetryProcInfo, GetCurrentArchitecture())
  4144. #else
  4145. #define NewGXOpenConnectionRetryProc(userRoutine)        \
  4146.         ((GXOpenConnectionRetryUPP) (userRoutine))
  4147. #endif
  4148.  
  4149. #if GENERATINGCFM
  4150. #define CallGXOpenConnectionRetryProc(userRoutine, theType, aVoid, retryopenPtr, anErr)        \
  4151.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXOpenConnectionRetryProcInfo, (theType), (aVoid), (retryopenPtr), (anErr))
  4152. #else
  4153. #define CallGXOpenConnectionRetryProc(userRoutine, theType, aVoid, retryopenPtr, anErr)        \
  4154.         (*(userRoutine))((theType), (aVoid), (retryopenPtr), (anErr))
  4155. #endif
  4156. #define Send_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  4157.           SendMessage(0x0000003D, theType, aVoid, retryopenPtr, anErr)
  4158.  
  4159. #define Forward_GXOpenConnectionRetry(theType, aVoid, retryopenPtr, anErr) \
  4160.           ForwardThisMessage((void *) (theType), (void *) (aVoid), (void *) (retryopenPtr), (void *) (anErr))
  4161. typedef OSErr (*GXExamineSpoolFileProcPtr)(gxSpoolFile theSpoolFile);
  4162.  
  4163. #if GENERATINGCFM
  4164. typedef UniversalProcPtr GXExamineSpoolFileUPP;
  4165. #else
  4166. typedef GXExamineSpoolFileProcPtr GXExamineSpoolFileUPP;
  4167. #endif
  4168.  
  4169. enum {
  4170.     uppGXExamineSpoolFileProcInfo = kCStackBased
  4171.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4172.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxSpoolFile)))
  4173. };
  4174.  
  4175. #if GENERATINGCFM
  4176. #define NewGXExamineSpoolFileProc(userRoutine)        \
  4177.         (GXExamineSpoolFileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXExamineSpoolFileProcInfo, GetCurrentArchitecture())
  4178. #else
  4179. #define NewGXExamineSpoolFileProc(userRoutine)        \
  4180.         ((GXExamineSpoolFileUPP) (userRoutine))
  4181. #endif
  4182.  
  4183. #if GENERATINGCFM
  4184. #define CallGXExamineSpoolFileProc(userRoutine, theSpoolFile)        \
  4185.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXExamineSpoolFileProcInfo, (theSpoolFile))
  4186. #else
  4187. #define CallGXExamineSpoolFileProc(userRoutine, theSpoolFile)        \
  4188.         (*(userRoutine))((theSpoolFile))
  4189. #endif
  4190. #define Send_GXExamineSpoolFile(theSpoolFile) SendMessage(0x0000003E, theSpoolFile)
  4191. #define Forward_GXExamineSpoolFile(theSpoolFile) ForwardThisMessage((void *) (theSpoolFile))
  4192. typedef OSErr (*GXFinishSendPlaneProcPtr)(void );
  4193.  
  4194. #if GENERATINGCFM
  4195. typedef UniversalProcPtr GXFinishSendPlaneUPP;
  4196. #else
  4197. typedef GXFinishSendPlaneProcPtr GXFinishSendPlaneUPP;
  4198. #endif
  4199.  
  4200. enum {
  4201.     uppGXFinishSendPlaneProcInfo = kCStackBased
  4202.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4203. };
  4204.  
  4205. #if GENERATINGCFM
  4206. #define NewGXFinishSendPlaneProc(userRoutine)        \
  4207.         (GXFinishSendPlaneUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFinishSendPlaneProcInfo, GetCurrentArchitecture())
  4208. #else
  4209. #define NewGXFinishSendPlaneProc(userRoutine)        \
  4210.         ((GXFinishSendPlaneUPP) (userRoutine))
  4211. #endif
  4212.  
  4213. #if GENERATINGCFM
  4214. #define CallGXFinishSendPlaneProc(userRoutine)        \
  4215.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFinishSendPlaneProcInfo)
  4216. #else
  4217. #define CallGXFinishSendPlaneProc(userRoutine)        \
  4218.         (*(userRoutine))()
  4219. #endif
  4220. #define Send_GXFinishSendPlane() SendMessage(0x0000003F)
  4221. #define Forward_GXFinishSendPlane() ForwardThisMessage((void *) (0))
  4222. typedef OSErr (*GXDoesPaperFitProcPtr)(gxTrayIndex whichTray, gxPaperType paper, Boolean *fits);
  4223.  
  4224. #if GENERATINGCFM
  4225. typedef UniversalProcPtr GXDoesPaperFitUPP;
  4226. #else
  4227. typedef GXDoesPaperFitProcPtr GXDoesPaperFitUPP;
  4228. #endif
  4229.  
  4230. enum {
  4231.     uppGXDoesPaperFitProcInfo = kCStackBased
  4232.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4233.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxTrayIndex)))
  4234.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxPaperType)))
  4235.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Boolean *)))
  4236. };
  4237.  
  4238. #if GENERATINGCFM
  4239. #define NewGXDoesPaperFitProc(userRoutine)        \
  4240.         (GXDoesPaperFitUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXDoesPaperFitProcInfo, GetCurrentArchitecture())
  4241. #else
  4242. #define NewGXDoesPaperFitProc(userRoutine)        \
  4243.         ((GXDoesPaperFitUPP) (userRoutine))
  4244. #endif
  4245.  
  4246. #if GENERATINGCFM
  4247. #define CallGXDoesPaperFitProc(userRoutine, whichTray, paper, fits)        \
  4248.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXDoesPaperFitProcInfo, (whichTray), (paper), (fits))
  4249. #else
  4250. #define CallGXDoesPaperFitProc(userRoutine, whichTray, paper, fits)        \
  4251.         (*(userRoutine))((whichTray), (paper), (fits))
  4252. #endif
  4253. #define Send_GXDoesPaperFit(whichTray, paper, fits) \
  4254.           SendMessage(0x00000040, whichTray, paper, fits)
  4255.  
  4256. #define Forward_GXDoesPaperFit(whichTray, paper, fits) \
  4257.           ForwardThisMessage((void *) (whichTray), (void *) (paper), (void *) (fits))
  4258. #endif
  4259. #if FOR_SYSTEM7_AND_SYSTEM8_DEPRECATED
  4260. typedef OSErr (*GXChooserMessageProcPtr)(long message, long caller, StringPtr objName, StringPtr zoneName, ListHandle theList, long p2);
  4261.  
  4262. #if GENERATINGCFM
  4263. typedef UniversalProcPtr GXChooserMessageUPP;
  4264. #else
  4265. typedef GXChooserMessageProcPtr GXChooserMessageUPP;
  4266. #endif
  4267.  
  4268. enum {
  4269.     uppGXChooserMessageProcInfo = kCStackBased
  4270.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4271.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(long)))
  4272.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
  4273.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(StringPtr)))
  4274.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(StringPtr)))
  4275.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(ListHandle)))
  4276.          | STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
  4277. };
  4278.  
  4279. #if GENERATINGCFM
  4280. #define NewGXChooserMessageProc(userRoutine)        \
  4281.         (GXChooserMessageUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXChooserMessageProcInfo, GetCurrentArchitecture())
  4282. #else
  4283. #define NewGXChooserMessageProc(userRoutine)        \
  4284.         ((GXChooserMessageUPP) (userRoutine))
  4285. #endif
  4286.  
  4287. #if GENERATINGCFM
  4288. #define CallGXChooserMessageProc(userRoutine, message, caller, objName, zoneName, theList, p2)        \
  4289.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXChooserMessageProcInfo, (message), (caller), (objName), (zoneName), (theList), (p2))
  4290. #else
  4291. #define CallGXChooserMessageProc(userRoutine, message, caller, objName, zoneName, theList, p2)        \
  4292.         (*(userRoutine))((message), (caller), (objName), (zoneName), (theList), (p2))
  4293. #endif
  4294. #define Send_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  4295.           SendMessage(0x00000041, message, caller, objName, zoneName, theList, p2)
  4296.  
  4297. #define Forward_GXChooserMessage(message, caller, objName, zoneName, theList, p2) \
  4298.           ForwardThisMessage((void *) (message), (void *) (caller), (void *) (objName), \
  4299.                                       (void *) (zoneName), (void *) (theList), (void *) (p2))
  4300. #endif
  4301. #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
  4302. typedef OSErr (*GXFindPrinterProfileProcPtr)(gxPrinter thePrinter, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  4303.  
  4304. #if GENERATINGCFM
  4305. typedef UniversalProcPtr GXFindPrinterProfileUPP;
  4306. #else
  4307. typedef GXFindPrinterProfileProcPtr GXFindPrinterProfileUPP;
  4308. #endif
  4309.  
  4310. enum {
  4311.     uppGXFindPrinterProfileProcInfo = kCStackBased
  4312.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4313.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPrinter)))
  4314.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  4315.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  4316.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(gxColorProfile *)))
  4317.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long *)))
  4318. };
  4319.  
  4320. #if GENERATINGCFM
  4321. #define NewGXFindPrinterProfileProc(userRoutine)        \
  4322.         (GXFindPrinterProfileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindPrinterProfileProcInfo, GetCurrentArchitecture())
  4323. #else
  4324. #define NewGXFindPrinterProfileProc(userRoutine)        \
  4325.         ((GXFindPrinterProfileUPP) (userRoutine))
  4326. #endif
  4327.  
  4328. #if GENERATINGCFM
  4329. #define CallGXFindPrinterProfileProc(userRoutine, thePrinter, searchData, index, returnedProfile, numProfiles)        \
  4330.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFindPrinterProfileProcInfo, (thePrinter), (searchData), (index), (returnedProfile), (numProfiles))
  4331. #else
  4332. #define CallGXFindPrinterProfileProc(userRoutine, thePrinter, searchData, index, returnedProfile, numProfiles)        \
  4333.         (*(userRoutine))((thePrinter), (searchData), (index), (returnedProfile), (numProfiles))
  4334. #endif
  4335. #define Send_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  4336.           SendMessage(0x00000042, thePrinter, searchData, index, returnedProfile, numProfiles)
  4337.  
  4338. #define Forward_GXFindPrinterProfile(thePrinter, searchData, index, returnedProfile, numProfiles) \
  4339.           ForwardThisMessage((void *) (thePrinter), (void *) (searchData), (void *) (index), (void *) (returnedProfile), (void *) (numProfiles))
  4340. typedef OSErr (*GXFindFormatProfileProcPtr)(gxFormat theFormat, void *searchData, long index, gxColorProfile *returnedProfile, long *numProfiles);
  4341.  
  4342. #if GENERATINGCFM
  4343. typedef UniversalProcPtr GXFindFormatProfileUPP;
  4344. #else
  4345. typedef GXFindFormatProfileProcPtr GXFindFormatProfileUPP;
  4346. #endif
  4347.  
  4348. enum {
  4349.     uppGXFindFormatProfileProcInfo = kCStackBased
  4350.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4351.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  4352.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(void *)))
  4353.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
  4354.          | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(gxColorProfile *)))
  4355.          | STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long *)))
  4356. };
  4357.  
  4358. #if GENERATINGCFM
  4359. #define NewGXFindFormatProfileProc(userRoutine)        \
  4360.         (GXFindFormatProfileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXFindFormatProfileProcInfo, GetCurrentArchitecture())
  4361. #else
  4362. #define NewGXFindFormatProfileProc(userRoutine)        \
  4363.         ((GXFindFormatProfileUPP) (userRoutine))
  4364. #endif
  4365.  
  4366. #if GENERATINGCFM
  4367. #define CallGXFindFormatProfileProc(userRoutine, theFormat, searchData, index, returnedProfile, numProfiles)        \
  4368.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXFindFormatProfileProcInfo, (theFormat), (searchData), (index), (returnedProfile), (numProfiles))
  4369. #else
  4370. #define CallGXFindFormatProfileProc(userRoutine, theFormat, searchData, index, returnedProfile, numProfiles)        \
  4371.         (*(userRoutine))((theFormat), (searchData), (index), (returnedProfile), (numProfiles))
  4372. #endif
  4373. #define Send_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  4374.           SendMessage(0x00000043, theFormat, searchData, index, returnedProfile, numProfiles)
  4375.  
  4376. #define Forward_GXFindFormatProfile(theFormat, searchData, index, returnedProfile, numProfiles) \
  4377.           ForwardThisMessage((void *) (theFormat), (void *) (searchData), (void *) (index), (void *) (returnedProfile), \
  4378.                                       (void *) (numProfiles))
  4379. typedef OSErr (*GXSetPrinterProfileProcPtr)(gxPrinter thePrinter, gxColorProfile oldProfile, gxColorProfile newProfile);
  4380.  
  4381. #if GENERATINGCFM
  4382. typedef UniversalProcPtr GXSetPrinterProfileUPP;
  4383. #else
  4384. typedef GXSetPrinterProfileProcPtr GXSetPrinterProfileUPP;
  4385. #endif
  4386.  
  4387. enum {
  4388.     uppGXSetPrinterProfileProcInfo = kCStackBased
  4389.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4390.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxPrinter)))
  4391.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxColorProfile)))
  4392.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxColorProfile)))
  4393. };
  4394.  
  4395. #if GENERATINGCFM
  4396. #define NewGXSetPrinterProfileProc(userRoutine)        \
  4397.         (GXSetPrinterProfileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetPrinterProfileProcInfo, GetCurrentArchitecture())
  4398. #else
  4399. #define NewGXSetPrinterProfileProc(userRoutine)        \
  4400.         ((GXSetPrinterProfileUPP) (userRoutine))
  4401. #endif
  4402.  
  4403. #if GENERATINGCFM
  4404. #define CallGXSetPrinterProfileProc(userRoutine, thePrinter, oldProfile, newProfile)        \
  4405.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSetPrinterProfileProcInfo, (thePrinter), (oldProfile), (newProfile))
  4406. #else
  4407. #define CallGXSetPrinterProfileProc(userRoutine, thePrinter, oldProfile, newProfile)        \
  4408.         (*(userRoutine))((thePrinter), (oldProfile), (newProfile))
  4409. #endif
  4410. #define Send_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  4411.           SendMessage(0x00000044, thePrinter, oldProfile, newProfile)
  4412.  
  4413. #define Forward_GXSetPrinterProfile(thePrinter, oldProfile, newProfile) \
  4414.           ForwardThisMessage((void *) (thePrinter), (void *) (oldProfile), (void *) (newProfile))
  4415. typedef OSErr (*GXSetFormatProfileProcPtr)(gxFormat theFormat, gxColorProfile oldProfile, gxColorProfile newProfile);
  4416.  
  4417. #if GENERATINGCFM
  4418. typedef UniversalProcPtr GXSetFormatProfileUPP;
  4419. #else
  4420. typedef GXSetFormatProfileProcPtr GXSetFormatProfileUPP;
  4421. #endif
  4422.  
  4423. enum {
  4424.     uppGXSetFormatProfileProcInfo = kCStackBased
  4425.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4426.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  4427.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxColorProfile)))
  4428.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(gxColorProfile)))
  4429. };
  4430.  
  4431. #if GENERATINGCFM
  4432. #define NewGXSetFormatProfileProc(userRoutine)        \
  4433.         (GXSetFormatProfileUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetFormatProfileProcInfo, GetCurrentArchitecture())
  4434. #else
  4435. #define NewGXSetFormatProfileProc(userRoutine)        \
  4436.         ((GXSetFormatProfileUPP) (userRoutine))
  4437. #endif
  4438.  
  4439. #if GENERATINGCFM
  4440. #define CallGXSetFormatProfileProc(userRoutine, theFormat, oldProfile, newProfile)        \
  4441.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSetFormatProfileProcInfo, (theFormat), (oldProfile), (newProfile))
  4442. #else
  4443. #define CallGXSetFormatProfileProc(userRoutine, theFormat, oldProfile, newProfile)        \
  4444.         (*(userRoutine))((theFormat), (oldProfile), (newProfile))
  4445. #endif
  4446. #define Send_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  4447.           SendMessage(0x00000045, theFormat, oldProfile, newProfile)
  4448.  
  4449. #define Forward_GXSetFormatProfile(theFormat, oldProfile, newProfile) \
  4450.           ForwardThisMessage((void *) (theFormat), (void *) (oldProfile), (void *) (newProfile))
  4451. typedef OSErr (*GXHandleAltDestinationProcPtr)(Boolean *userCancels);
  4452.  
  4453. #if GENERATINGCFM
  4454. typedef UniversalProcPtr GXHandleAltDestinationUPP;
  4455. #else
  4456. typedef GXHandleAltDestinationProcPtr GXHandleAltDestinationUPP;
  4457. #endif
  4458.  
  4459. enum {
  4460.     uppGXHandleAltDestinationProcInfo = kCStackBased
  4461.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4462.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Boolean *)))
  4463. };
  4464.  
  4465. #if GENERATINGCFM
  4466. #define NewGXHandleAltDestinationProc(userRoutine)        \
  4467.         (GXHandleAltDestinationUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXHandleAltDestinationProcInfo, GetCurrentArchitecture())
  4468. #else
  4469. #define NewGXHandleAltDestinationProc(userRoutine)        \
  4470.         ((GXHandleAltDestinationUPP) (userRoutine))
  4471. #endif
  4472.  
  4473. #if GENERATINGCFM
  4474. #define CallGXHandleAltDestinationProc(userRoutine, userCancels)        \
  4475.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXHandleAltDestinationProcInfo, (userCancels))
  4476. #else
  4477. #define CallGXHandleAltDestinationProc(userRoutine, userCancels)        \
  4478.         (*(userRoutine))((userCancels))
  4479. #endif
  4480. #define Send_GXHandleAltDestination(userCancels) SendMessage(0x00000046, userCancels)
  4481. #define Forward_GXHandleAltDestination(userCancels) ForwardThisMessage((void *) (userCancels))
  4482. typedef OSErr (*GXSetupPageImageDataProcPtr)(gxFormat theFormat, gxShape thePage, void *imageData);
  4483.  
  4484. #if GENERATINGCFM
  4485. typedef UniversalProcPtr GXSetupPageImageDataUPP;
  4486. #else
  4487. typedef GXSetupPageImageDataProcPtr GXSetupPageImageDataUPP;
  4488. #endif
  4489.  
  4490. enum {
  4491.     uppGXSetupPageImageDataProcInfo = kCStackBased
  4492.          | RESULT_SIZE(SIZE_CODE(sizeof(OSErr)))
  4493.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(gxFormat)))
  4494.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(gxShape)))
  4495.          | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(void *)))
  4496. };
  4497.  
  4498. #if GENERATINGCFM
  4499. #define NewGXSetupPageImageDataProc(userRoutine)        \
  4500.         (GXSetupPageImageDataUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppGXSetupPageImageDataProcInfo, GetCurrentArchitecture())
  4501. #else
  4502. #define NewGXSetupPageImageDataProc(userRoutine)        \
  4503.         ((GXSetupPageImageDataUPP) (userRoutine))
  4504. #endif
  4505.  
  4506. #if GENERATINGCFM
  4507. #define CallGXSetupPageImageDataProc(userRoutine, theFormat, thePage, imageData)        \
  4508.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppGXSetupPageImageDataProcInfo, (theFormat), (thePage), (imageData))
  4509. #else
  4510. #define CallGXSetupPageImageDataProc(userRoutine, theFormat, thePage, imageData)        \
  4511.         (*(userRoutine))((theFormat), (thePage), (imageData))
  4512. #endif
  4513. #define Send_GXSetupPageImageData(theFormat, thePage, imageData) \
  4514.           SendMessage(0x00000047, theFormat, thePage, imageData)
  4515.  
  4516. #define Forward_GXSetupPageImageData(theFormat, thePage, imageData) \
  4517.           ForwardThisMessage((void *) (theFormat), (void *) (thePage), (void *) (imageData))
  4518. /*
  4519. ******************************************************************
  4520.                     Start of old "GXPrintingErrors.h/a/p" interface file.
  4521.             *******************************************************************
  4522. */
  4523.  
  4524. enum {
  4525.     gxPrintingResultBase        = -510                            /*First QuickDraw GX printing error code.*/
  4526. };
  4527.  
  4528. /*RESULT CODES FOR QUICKDRAW GX PRINTING OPERATIONS*/
  4529.  
  4530. enum {
  4531.     gxAioTimeout                = (gxPrintingResultBase),        /*-510 : Timeout condition occurred during operation*/
  4532.     gxAioBadRqstState            = (gxPrintingResultBase - 1),    /*-511 : Async I/O request in invalid state for operation*/
  4533.     gxAioBadConn                = (gxPrintingResultBase - 2),    /*-512 : Invalid Async I/O connection refnum*/
  4534.     gxAioInvalidXfer            = (gxPrintingResultBase - 3),    /*-513 : Read data transfer structure contained bad values*/
  4535.     gxAioNoRqstBlks                = (gxPrintingResultBase - 4),    /*-514 : No available request blocks to process request*/
  4536.     gxAioNoDataXfer                = (gxPrintingResultBase - 5),    /*-515 : Data transfer structure pointer not specified*/
  4537.     gxAioTooManyAutos            = (gxPrintingResultBase - 6),    /*-516 : Auto status request already active*/
  4538.     gxAioNoAutoStat                = (gxPrintingResultBase - 7),    /*-517 : Connection not configured for auto status*/
  4539.     gxAioBadRqstID                = (gxPrintingResultBase - 8),    /*-518 : Invalid I/O request identifier*/
  4540.     gxAioCantKill                = (gxPrintingResultBase - 9),    /*-519 : Comm. protocol doesn't support I/O term*/
  4541.     gxAioAlreadyExists            = (gxPrintingResultBase - 10),    /*-520 : Protocol spec. data already specified*/
  4542.     gxAioCantFind                = (gxPrintingResultBase - 11),    /*-521 : Protocol spec. data does not exist*/
  4543.     gxAioDeviceDisconn            = (gxPrintingResultBase - 12),    /*-522 : Machine disconnected from printer*/
  4544.     gxAioNotImplemented            = (gxPrintingResultBase - 13),    /*-523 : Function not implemented*/
  4545.     gxAioOpenPending            = (gxPrintingResultBase - 14),    /*-524 : Opening a connection for protocol, but another open pending*/
  4546.     gxAioNoProtocolData            = (gxPrintingResultBase - 15),    /*-525 : No protocol specific data specified in request*/
  4547.     gxAioRqstKilled                = (gxPrintingResultBase - 16),    /*-526 : I/O request was terminated*/
  4548.     gxBadBaudRate                = (gxPrintingResultBase - 17),    /*-527 : Invalid baud rate specified*/
  4549.     gxBadParity                    = (gxPrintingResultBase - 18),    /*-528 : Invalid parity specified*/
  4550.     gxBadStopBits                = (gxPrintingResultBase - 19),    /*-529 : Invalid stop bits specified*/
  4551.     gxBadDataBits                = (gxPrintingResultBase - 20),    /*-530 : Invalid data bits specified*/
  4552.     gxBadPrinterName            = (gxPrintingResultBase - 21),    /*-531 : Bad printer name specified*/
  4553.     gxAioBadMsgType                = (gxPrintingResultBase - 22),    /*-532 : Bad masType field in transfer info structure*/
  4554.     gxAioCantFindDevice            = (gxPrintingResultBase - 23),    /*-533 : Cannot locate target device*/
  4555.     gxAioOutOfSeq                = (gxPrintingResultBase - 24),    /*-534 : Non-atomic SCSI requests submitted out of sequence*/
  4556.     gxPrIOAbortErr                = (gxPrintingResultBase - 25),    /*-535 : I/O operation aborted*/
  4557.     gxPrUserAbortErr            = (gxPrintingResultBase - 26),    /*-536 : User aborted*/
  4558.     gxCantAddPanelsNowErr        = (gxPrintingResultBase - 27),    /*-537 : Can only add panels during driver switch or dialog setup*/
  4559.     gxBadxdtlKeyErr                = (gxPrintingResultBase - 28),    /*-538 : Unknown key for xdtl - must be radiobutton, etc*/
  4560.     gxXdtlItemOutOfRangeErr        = (gxPrintingResultBase - 29),    /*-539 : Referenced item does not belong to panel*/
  4561.     gxNoActionButtonErr            = (gxPrintingResultBase - 30),    /*-540 : Action button is nil*/
  4562.     gxTitlesTooLongErr            = (gxPrintingResultBase - 31),    /*-541 : Length of buttons exceeds alert maximum width*/
  4563.     gxUnknownAlertVersionErr    = (gxPrintingResultBase - 32),    /*-542 : Bad version for printing alerts*/
  4564.     gxGBBufferTooSmallErr        = (gxPrintingResultBase - 33),    /*-543 : Buffer too small.*/
  4565.     gxInvalidPenTable            = (gxPrintingResultBase - 34),    /*-544 : Invalid vector driver pen table.*/
  4566.     gxIncompletePrintFileErr    = (gxPrintingResultBase - 35),    /*-545 : Print file was not completely spooled*/
  4567.     gxCrashedPrintFileErr        = (gxPrintingResultBase - 36),    /*-546 : Print file is corrupted*/
  4568.     gxInvalidPrintFileVersion    = (gxPrintingResultBase - 37),    /*-547 : Print file is incompatible with current QuickDraw GX version*/
  4569.     gxSegmentLoadFailedErr        = (gxPrintingResultBase - 38),    /*-548 : Segment loader error*/
  4570.     gxExtensionNotFoundErr        = (gxPrintingResultBase - 39),    /*-549 : Requested printing extension could not be found*/
  4571.     gxDriverVersionErr            = (gxPrintingResultBase - 40),    /*-550 : Driver too new for current version of QuickDraw GX*/
  4572.     gxImagingSystemVersionErr    = (gxPrintingResultBase - 41),    /*-551 : Imaging system too new for current version of QuickDraw GX*/
  4573.     gxFlattenVersionTooNew        = (gxPrintingResultBase - 42),    /*-552 : Flattened object format too new for current version of QDGX*/
  4574.     gxPaperTypeNotFound            = (gxPrintingResultBase - 43),    /*-553 : Requested papertype could not be found*/
  4575.     gxNoSuchPTGroup                = (gxPrintingResultBase - 44),    /*-554 : Requested papertype group could not be found*/
  4576.     gxNotEnoughPrinterMemory    = (gxPrintingResultBase - 45),    /*-555 : Printer does not have enough memory for fonts in document*/
  4577.     gxDuplicatePanelNameErr        = (gxPrintingResultBase - 46),    /*-556 : Attempt to add more than 10 panels with the same name*/
  4578.     gxExtensionVersionErr        = (gxPrintingResultBase - 47)    /*-557 : Extension too new for current version of QuickDraw GX*/
  4579. };
  4580.  
  4581. #endif
  4582.  
  4583. #if PRAGMA_ALIGN_SUPPORTED
  4584. #pragma options align=reset
  4585. #endif
  4586.  
  4587. #if PRAGMA_IMPORT_SUPPORTED
  4588. #pragma import off
  4589. #endif
  4590.  
  4591. #ifdef __cplusplus
  4592. }
  4593. #endif
  4594.  
  4595. #endif /* __GXPRINTING__ */
  4596.  
  4597.